How getsentry/relay works
Relay is a proxy service between Sentry SDKs and Sentry, handling inbound submissions and either forwarding them upstream or, with processing enabled, normalizing, filtering, rate-limiting, and producing events to Kafka. Its documented product capabilities also include PII scrubbing and support for multiple data types. The graph emphasizes the server’s service orchestration and major domain subsystems; some implementation relationships are omitted because their source was not sampled.
Main entry points: mod.rs Event processing · service.rs Service orchestration · processor.rs Envelope processor · upstream.rs Upstream relay
Components 22
Relay runtime
- Relay entrypoint
relay/src/main.rs - Service orchestration
relay-server/src/service.rs - HTTP endpoints
relay-server/src/endpoints/mod.rs - Authentication
relay-auth/src/lib.rs - Project configuration
relay-server/src/services/projects/source/mod.rs
Ingestion and processing
- Envelope processor
relay-server/src/services/processor.rs - Event processing
relay-server/src/processing/mod.rs - Normalization
relay-event-normalization/src/lib.rs - Inbound filters
relay-filter/src/lib.rs - Rate limits
relay-quotas/src/lib.rs
Event data
- Event protocol
relay-event-schema/src/protocol/event.rs - PII scrubbing
relay-pii/src/lib.rs - Profiling
relay-profiling/src/lib.rs - Replays
relay-replays/src/lib.rs - Metrics and spans
relay-metrics/src/lib.rs
Delivery and integrations
- Envelope buffer
relay-server/src/services/buffer/mod.rs - Event store
relay-server/src/services/store.rs - Upstream relay
relay-server/src/services/upstream.rs - Kafka
relay-kafka/src/lib.rs - Object storage
relay-server/src/services/objectstore.rs
Other components
- SDK or app
- Sentry server
Connections 21
- SDK or app → HTTP endpoints: submits events
README.md - Relay entrypoint → Service orchestration: runs services
- Service orchestration → Envelope processor: starts
relay-server/src/service.rs - Service orchestration → Envelope buffer: starts
relay-server/src/service.rs - Service orchestration → Event store: starts
relay-server/src/service.rs - Service orchestration → Upstream relay: starts
relay-server/src/service.rs - Service orchestration → Object storage: starts
relay-server/src/service.rs - Service orchestration → Project configuration: starts
relay-server/src/service.rs - HTTP endpoints → Authentication: authenticates
- Envelope processor → Event processing: processes
- Event processing → Normalization: normalizes
README.md - Event processing → Inbound filters: filters
README.md - Event processing → Rate limits: rate limits
README.md - Event processing → PII scrubbing: scrubs PII
README.md - Event processing → Event protocol: processes events
- Envelope processor → Kafka: produces events
README.md - Service orchestration → Upstream relay: forwards submissions
README.md - Upstream relay → Sentry server: forwards
README.md - Event processing → Profiling: handles profiles
- Event processing → Replays: handles replays
- Event processing → Metrics and spans: handles metrics