Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (29 loc) · 912 Bytes

File metadata and controls

50 lines (29 loc) · 912 Bytes

OpenTelemetry Celery Instrumentation

pypi

Instrumentation for Celery.

Installation

pip install opentelemetry-ext-celery

Usage

  • Start broker backend
::
docker run -p 5672:5672 rabbitmq
  • Run instrumented task
from opentelemetry.ext.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