Skip to content

Commit 2ca317a

Browse files
Kyle-VerhoogEmanuele Palazzetti
authored andcommitted
[celery] documentation tweaks (#548)
1 parent 02b096d commit 2ca317a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ddtrace/contrib/celery/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The Celery integration will trace all tasks that are executed in the
33
background. Functions and class based tasks are traced only if the Celery API
44
is used, so calling the function directly or via the ``run()`` method will not
5-
generate traces. On the other hand, calling ``apply()``, ``apply_async()`` and ``delay()``
5+
generate traces. However, calling ``apply()``, ``apply_async()`` and ``delay()``
66
will produce tracing data. To trace your Celery application, call the patch method::
77
88
import celery
@@ -22,13 +22,7 @@ def run(self):
2222
2323
To change Celery service name, you can use the ``Config`` API as follows::
2424
25-
from ddtrace import Pin
26-
27-
app = celery.Celery()
28-
29-
@app.task
30-
def compute_stats():
31-
pass
25+
from ddtrace import config
3226
3327
# change service names for producers and workers
3428
config.celery['producer_service_name'] = 'task-queue'

0 commit comments

Comments
 (0)