Sentry Integration¶
The outbox propagates Sentry trace context across the transaction boundary.
How It Works¶
- Producer captures
sentry_sdk.get_traceparent()andsentry_sdk.get_baggage() - Trace IDs are stored in
CeleryOutbox.sentry_trace_idandsentry_baggage - Relay sends them as
sentry-traceandbaggageheaders - Worker continues the trace
Configuration¶
No configuration needed. If Sentry SDK is installed and initialized, trace propagation is automatic.
Trace Continuity¶
Producer Transaction
└── celery_outbox.intercept (span)
│
[DATABASE]
│
Relay Transaction
└── celery_outbox.relay.send (span)
│
[BROKER]
│
Worker Transaction
└── task.execute (span)
Sentry Dashboard¶
In Sentry, you'll see:
- Producer transaction: Original HTTP request that created the task
- Relay span:
celery_outbox.relay.sendwith message ID - Worker transaction: Task execution linked to producer
This gives you end-to-end visibility from HTTP request to task completion.