--- id: opentelemetry-instrumentation-celery version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-celery — OpenTelemetry Celery Instrumentation License: permissive · Maintenance: active · Downloads: 10.9M/mo ## What it is and what it does This package integrates OpenTelemetry tracing into Celery, the popular distributed task queue library. It automatically instruments Celery task execution to emit spans that capture task lifecycle events—when tasks are sent, received, started, and completed—making it possible to trace task flows across distributed systems and correlate them with other instrumented services. The package depends on the OpenTelemetry API and instrumentation framework, which provide the underlying tracing infrastructure. You install it alongside your Celery setup and call the instrumentation once at application startup. It then hooks into Celery's task execution to emit traces that can be exported to any OpenTelemetry-compatible backend (Jaeger, Datadog, New Relic, etc.). This is most useful when you need end-to-end visibility into asynchronous task processing, especially in microservice architectures where tasks span multiple services or when debugging task failures and performance issues. Use it for: - Trace task execution across a distributed Celery cluster to identify bottlenecks and latency in async job processing. - Correlate Celery task spans with HTTP request traces to see the full path of work triggered by a user action. - Debug task failures by examining task span logs, exceptions, and timing data in a centralized tracing backend. - Monitor task queue health by collecting metrics on task duration, success/failure rates, and queue depth over time. - Investigate performance regressions in task processing by comparing span data before and after code changes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds distributed tracing and observability to Celery task queues via OpenTelemetry, capturing task execution spans and metrics across your task processing pipeline. Yes, if you run Celery in production and need observability into task execution. The package is actively maintained, has no known vulnerabilities, installs with low friction, and is part of the widely-adopted OpenTelemetry ecosystem. Install it if you already use or plan to use OpenTelemetry for tracing; skip it if you have no tracing infrastructure in place or use a different observability tool that doesn't integrate with OpenTelemetry. ## Install pip install opentelemetry-instrumentation-celery uv add opentelemetry-instrumentation-celery poetry add opentelemetry-instrumentation-celery ## Installing opentelemetry-instrumentation-celery Before you install: Low friction installation with three lightweight runtime dependencies (opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions). Package is actively maintained with a recent release and no known vulnerabilities. License in practice: Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; attribution required but no copyleft obligations. Quickstart: pip install opentelemetry-instrumentation-celery from opentelemetry.instrumentation.celery import CeleryInstrumentor CeleryInstrumentor().instrument() Requires Python 3.10 or later; Celery itself must be installed and configured separately. Verify before relying: - Whether this package automatically detects and instruments existing Celery apps or requires explicit configuration per app instance. - What span attributes and metrics are captured for Celery tasks (task name, args, result, exception details, queue name). - Whether it supports both task execution tracing and task scheduling/enqueue tracing. - Compatibility with Celery versions and whether there are known limitations with specific Celery features (task routing, retries, etc.). ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 10.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags celery tracing instrumentation, opentelemetry celery, distributed task tracing, celery observability, task queue monitoring, celery span collection, async task instrumentation, tracing, celery, observability [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-celery) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-celery/)