From ed347cde9337afab787f62459d8bf8f926a88907 Mon Sep 17 00:00:00 2001 From: kyle-verhoog Date: Wed, 29 Aug 2018 18:14:29 -0400 Subject: [PATCH] [celery] documentation tweaks --- ddtrace/contrib/celery/__init__.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ddtrace/contrib/celery/__init__.py b/ddtrace/contrib/celery/__init__.py index d4bc8157232..1acd7fb72c1 100644 --- a/ddtrace/contrib/celery/__init__.py +++ b/ddtrace/contrib/celery/__init__.py @@ -2,7 +2,7 @@ The Celery integration will trace all tasks that are executed in the background. Functions and class based tasks are traced only if the Celery API is used, so calling the function directly or via the ``run()`` method will not -generate traces. On the other hand, calling ``apply()``, ``apply_async()`` and ``delay()`` +generate traces. However, calling ``apply()``, ``apply_async()`` and ``delay()`` will produce tracing data. To trace your Celery application, call the patch method:: import celery @@ -22,13 +22,7 @@ def run(self): To change Celery service name, you can use the ``Config`` API as follows:: - from ddtrace import Pin - - app = celery.Celery() - - @app.task - def compute_stats(): - pass + from ddtrace import config # change service names for producers and workers config.celery['producer_service_name'] = 'task-queue'