How getsentry/sentry-elixir works
Sentry is the official Elixir SDK for reporting errors, logs, traces, metrics, and check-ins to Sentry. The principal workflow is an application invoking the SDK (or an attached handler/integration capturing activity), the client preparing and filtering telemetry, and the transport sending it. The README documents the major capture capabilities; sampled source confirms client dispatch and application startup wiring. Other subsystem links reflect module responsibilities and documented integrations, but their internal call chains were not sampled.
Main entry points: telemetry_processor.ex Telemetry processor · client.ex Event client · sentry.ex Sentry API · span_processor.ex Span processor
Components 26
Capture and context
- Sentry API
lib/sentry.ex - Event client
lib/sentry/client.ex - Event model
lib/sentry/event.ex - Configuration
lib/sentry/config.ex - Plug capture
lib/sentry/plug_capture.ex - Plug context
lib/sentry/plug_context.ex - Logger handler
lib/sentry/logger_handler.ex
Telemetry features
- Structured logs
lib/sentry/logger_handler/logs_backend.ex - Log error capture
lib/sentry/logger_handler/error_backend.ex - Transactions
lib/sentry/transaction.ex - Span processor
lib/sentry/opentelemetry/span_processor.ex - Span storage
lib/sentry/opentelemetry/span_storage.ex - Metrics API
lib/sentry/metrics.ex - Metric batches
lib/sentry/metric_batch.ex - Monitor check-ins
lib/sentry/check_in.ex
Runtime and integrations
- Framework integrations
lib/sentry/integrations - SDK supervision
lib/sentry/application.ex
Processing and delivery
- Telemetry processor
lib/sentry/telemetry_processor.ex - Transport sender
lib/sentry/transport/sender.ex - HTTP client
lib/sentry/http_client.ex
Other components
- Elixir application
- Sentry service
- Plug/Phoenix app
- Elixir Logger
- OpenTelemetry
- Oban / Quantum
Connections 28
- Elixir application → Sentry API: reports through
- Sentry API → Event client: submits events
- Event client → Event model: processes event
- Event client → Configuration: reads options
- Event client → Telemetry processor: dispatches telemetry
- Event client → Transport sender: sends directly
- Plug/Phoenix app → Plug capture: captures exceptions
- Plug capture → Sentry API: reports exception
- Plug/Phoenix app → Plug context: provides request context
- Logger handler → Log error capture: captures errors
- Logger handler → Structured logs: forwards logs
- Log error capture → Sentry API: reports events
- Structured logs → Telemetry processor: submits logs
- OpenTelemetry → Span processor: processes spans
- Span processor → Span storage: stores spans
- Span processor → Telemetry processor: submits transactions
- Elixir application → Metrics API: records metrics
- Metrics API → Metric batches: batches metrics
- Metric batches → Telemetry processor: submits metrics
- Elixir application → Monitor check-ins: reports check-ins
- Monitor check-ins → Telemetry processor: submits check-ins
- SDK supervision → Logger handler: attaches handler
- SDK supervision → Framework integrations: starts integrations
- Oban / Quantum → Framework integrations: emits job signals
- Framework integrations → Sentry API: reports activity
- Telemetry processor → Transport sender: dispatches batches
- Transport sender → HTTP client: sends requests
- HTTP client → Sentry service: posts telemetry