opentelemetry-instrumentation-celery
OpenTelemetry Celery Instrumentation
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 on this page — 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
opentelemetry-instrumentation-celery on PyPI
pip
pip install opentelemetry-instrumentation-celeryuv
uv add opentelemetry-instrumentation-celerypoetry
poetry add opentelemetry-instrumentation-celeryInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,866,605/month — #1,430 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_celery-0.65b0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
elastic-opentelemetryElastic's customized distribution of…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-asyncioAdds distributed tracing and metrics to asyncio…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-jinja2Adds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-remouladeAdds distributed tracing instrumentation for…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-clickAdds distributed tracing instrumentation to the…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-aiokafkaAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-grpcAdds automatic tracing and monitoring to gRPC…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-pymongoAdds automatic tracing and observability…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-kafka-pythonAdds distributed tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-pymemcacheAdds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI