Skip to main content

OpenTelemetry Celery Instrumentation

Project description

pypi

Instrumentation for Celery.

Installation

pip install opentelemetry-instrumentation-celery

Usage

  • Start broker backend

::

docker run -p 5672:5672 rabbitmq

  • Run instrumented task

from opentelemetry.instrumentation.celery import CeleryInstrumentor

CeleryInstrumentor().instrument()

from celery import Celery

app = Celery("tasks", broker="amqp://localhost")

@app.task
def add(x, y):
    return x + y

add.delay(42, 50)

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page