{
  "id": 9059487,
  "title": "Zero-Code OpenTelemetry Tracing for Dagster",
  "url": "https://urgent.news/2026/09/22/zero-code-opentelemetry-tracing-for-dagster",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-22T01:39:49.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hirofumi_tsuda/zero-code-opentelemetry-tracing-for-dagster-3h6i"
  },
  "original_language": "en",
  "account": "Dagster pipelines can now benefit from automatic, zero-code tracing using the opentelemetry-instrumentation-dagster package. This new tool allows for distributed tracing without modifying any pipeline code. To use it, simply install the package, set environment variables for the OpenTelemetry service name and OTEL_EXPORTER_OTLP_ENDPOINT, and run the Dagster command through the opentelemetry-instrument launcher. This triggers automatic tracing for all @op, @asset, @multi_asset, @asset_check, and @dbt_assets functions in the pipeline, without any explicit decorators or imports. The package achieves this by patching decorator factories, such as dagster.op, dagster.asset, and dagster.multi_asset, before Dagster builds the OpDefinition or AssetsDefinition. This ensures that tracing occurs automatically, even when processes are spawned in a multi-process execution environment. The package works by inserting a sitecustomize.py file into the PYTHONPATH, which triggers the auto-instrumentation before your code imports the Dagster library. This allows for consistent tracing across all processes, including those spawned by the k8s_job_executor. However, the @graph_asset decorator is intentionally excluded from this automatic tracing, as its function is a composition function called at definition time and does not receive a runtime context. The package has been thoroughly tested in real infrastructure, including a Kubernetes cluster with Postgres-backed run storage and k8s_job_executor, ensuring its reliability and effectiveness in tracing Dagster pipelines.",
  "summary": "If you run Dagster pipelines in production, you've probably wanted distributed tracing at some point — seeing exactly how long each op/asset took, how steps nest across a run, and how a run connects to whatever triggered it (a sensor tick, a CI pipeline, another OTel-instrumented service upstream). A while back I built dagster-otel : a @traced() decorator you stack under @op / @asset , explicit…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}