Metadata-Version: 2.4
Name: opentelemetry-instrumentor-dramatiq
Version: 0.1.3
Summary: An instrumentor for dramatiq library
Author-email: Sunil <shrest4647+pip@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Shrest4647/opentelemetry-instrumentor-dramatiq
Keywords: dramatiq,opentelemetry,instrumentation,tracing,telemetry
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dramatiq>=1.2
Requires-Dist: opentelemetry-api>=1.11.0
Requires-Dist: opentelemetry-instrumentation>=0.31b0
Requires-Dist: opentelemetry-semantic-conventions
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pip-tools; extra == "dev"
Requires-Dist: bumpver; extra == "dev"
Requires-Dist: pika; extra == "dev"
Requires-Dist: redis; extra == "dev"
Dynamic: license-file

# opentelemetry-instrumentor-dramatiq

Opentelemetry traces instrumentation for Dramatiq (An async processing library for python)

## Installation

```bash
pip install opentelemetry-instrumentor-dramatiq
```

## Usage

```python
import dramatiq
from opentelemetry import trace
from opentelemetry_instrumentor_dramatiq import DramatiqInstrumentor

tracer = trace.get_tracer(__name__)

# Instrument the dramatiq library at the start of your application
DramatiqInstrumentor().instrument()

@dramatiq.actor(queue_name="default")
@tracer.start_as_current_span("my_actor")  # trace the actor
def my_actor(message):
    print(message)

my_actor.send("Hello, world!")

```

## Contributing

Contributions are welcome!
