dagster-otel
OpenTelemetry tracing for Dagster ops and assets -- with trace/span IDs correlated into your own log lines -- without giving up ownership of your op/asset definitions to a third-party decorator, and without monkeypatching Dagster internals.
Status: early prototype, self-tested locally against real Dagster runs + a real trace backend. Not published to PyPI yet.
from dagster import asset, job, op
from dagster_otel import traced
@op(...) # Dagster's own @op still owns op-ness; @traced() is a thin
@traced() # layer underneath. No @resource/required_resource_keys, no
def upstream_op(context) -> int: # manual "root" step -- the first @traced() step to
... # run in a given run just becomes the root.
@op(...)
@traced()
def downstream_op(context, x: int) -> int:
...
@asset(...)
@traced() # same decorator, works for assets too
def downstream_asset(context) -> None:
...
@job(...)
def my_job():
downstream_op(upstream_op())
Set OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT (standard OTel env vars) to
name your service and point it at a collector/backend -- @traced() configures the
SDK for you the first time it runs in a process, so there's nothing else to wire up.
Call configure() yourself only if you want configuration to happen eagerly (e.g.
from a @resource) rather than lazily on first use.
Works across Dagster's multiprocess and k8s_job_executor executors: each step
usually runs in its own process, sometimes on its own node, so trace context is
propagated via Dagster's own run storage rather than in-process memory. See
docs/design.md for how, and what's verified vs. still assumed.
Why this exists
See docs/design.md for the full rationale, including a comparison
against prior art (formenergy-observability,
a monkeypatch-based prototype) and the design decisions (no monkeypatching, decorators
stack under Dagster's own @op/@asset rather than replacing it, log correlation via
a public logging.Filter on context.log).
License
MIT.
Metadata
Release files for dagster-otel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dagster_otel-0.1.0.tar.gz | 228.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dagster_otel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 244.3 kB
Release files / dagster_otel-0.1.0.tar.gz
| Download URL | dagster_otel-0.1.0.tar.gz |
|---|---|
| Size | 228.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e0697c3b6f9f41eba296c25855049734b059c783fccee77a53da082d35f8dce
|
|
BLAKE2b-256 checksum How to use checksums |
60632827e0d8835bf00883fcb4db18ce047932a27b4f0e9ac3b426b462bbb90b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / dagster_otel-0.1.0-py3-none-any.whl
| Download URL | dagster_otel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3876dfa8c6087bf52a226dc0a948521b22f55c210692079a605f7ef1a2f1c30
|
|
BLAKE2b-256 checksum How to use checksums |
7557531832e13ba97c7b0be9a8ace763c6640b4afccd580a6fb74f624672a186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log