skillfed

opentelemetry-instrumentation-celery

OpenTelemetry Celery Instrumentation

opentelemetry-instrumentation-celery v0.65b0 10.9M downloads/30d#1,430 on PyPI1,086
Permissive license Apache-2.0 Active released

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-celery

uv

uv add opentelemetry-instrumentation-celery

poetry

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 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

celery tracing instrumentationopentelemetry celerydistributed task tracingcelery observabilitytask queue monitoringcelery span collectionasync task instrumentation
tracingceleryobservability

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

elastic-opentelemetry

Elastic's customized distribution of…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-asyncio

Adds distributed tracing and metrics to asyncio…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-jinja2

Adds OpenTelemetry tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-remoulade

Adds distributed tracing instrumentation for…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-click

Adds distributed tracing instrumentation to the…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-aiokafka

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-grpc

Adds automatic tracing and monitoring to gRPC…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-pymongo

Adds automatic tracing and observability…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-kafka-python

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-pymemcache

Adds OpenTelemetry tracing instrumentation to…

permissive · top 5,000 on PyPI