Skip to content

Commit

Permalink
Small update to distributed tracing in Celery (#10161)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed May 30, 2024
1 parent ee27e9e commit d7594cf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/platforms/python/integrations/celery/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,16 @@ You can pass the following keyword arguments to `CeleryIntegration()`:

- `propagate_traces`

Propagate Sentry tracing information to the Celery task. This makes it possible to link Celery task errors to the function that triggered the task.
Propagate Sentry tracing information to the Celery task. This makes it possible to link Celery task errors to the function that triggered the task.

If this is set to `False`:
If this is set to `False`:

- errors in Celery tasks won't be matched to the triggering function.
- your Celery tasks will start a new trace and won't be connected to the trace in the calling function.
- errors in Celery tasks won't be matched to the triggering function.
- your Celery tasks will start a new trace and won't be connected to the trace in the calling function.

The default is `True`.
The default is `True`.

See [Distributed Traces](#distributed-traces) below to learn how to get more fine grained control over distributed tracing in Celery tasks.

- `monitor_beat_tasks`:

Expand Down Expand Up @@ -128,6 +130,8 @@ You can disable this globally with the `propagate_traces` parameter, documented

If you want to have more fine-grained control over trace distribution, you can override the `propagate_traces` option by passing the `sentry-propagate-traces` header when starting the Celery task:

**Note:** The `CeleryIntegration` does not utilize the `traces_sample_rate` config option for deciding if a trace should be propagated into a Celery task.

```python
import sentry_sdk

Expand Down

0 comments on commit d7594cf

Please sign in to comment.