Skip to content

feat(telemetry): add OpenTelemetry tracing for workflow execution - #482

Draft
hertznsk wants to merge 20 commits into
microsoft:mainfrom
hertznsk:feat/opentelemetry-tracing
Draft

feat(telemetry): add OpenTelemetry tracing for workflow execution#482
hertznsk wants to merge 20 commits into
microsoft:mainfrom
hertznsk:feat/opentelemetry-tracing

Conversation

@hertznsk

@hertznskhertznsk commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes#481

This PR introduces opt-in OpenTelemetry tracing for Conductor.

What is added

  • New optional runtime.telemetry YAML block with enabled and service_name fields.
  • New conductor.telemetry package with lazy SDK imports, OTLP tracer provider setup, and a TelemetrySubscriber that turns workflow events into detached OpenTelemetry spans.
  • Orchestration spans for workflows, agents, parallel groups, for-each items, subworkflows, tools, validators, and human gates.
  • Native Pydantic AI instrumentation for claude and openai providers, correlated with Conductor runs via gen_ai.conversation.id.
  • CLI wiring in conductor run and conductor resume, including the resume-with-dashboard path.
  • conductor validate warning when telemetry is enabled but the SDK extra is missing.
  • Documentation, example workflow, changelog entry, and architecture notes.

Verification

  • make check passes (ruff + ty).
  • make test passes: 7653 passed, 58 skipped, 14 deselected.
  • make test-frontend passes: 151 passed.
  • make validate-examples passes, including the new examples/telemetry.yaml.

Commits

  • build(deps): add opentelemetry-api core dep and telemetry extra
  • feat(telemetry): add telemetry package skeleton with config model and SDK guards
  • feat(telemetry): add event-to-span TelemetrySubscriber with detached-span lifecycle
  • feat(telemetry): wire TelemetrySubscriber into run and resume CLI paths
  • feat(config): add runtime.telemetry block with validate-time SDK warning
  • feat(providers): enable native pydantic-ai instrumentation with run correlation when telemetry is active
  • feat(engine): include item index in for_each per-item event payloads
  • test(telemetry): add regression suite for failure paths, resume, and export degradation
  • docs(telemetry): document OpenTelemetry tracing, add example workflow
  • docs(agents): document telemetry package in architecture overview

@hertznsk
hertznsk marked this pull request as draft August 24, 2026 07:46
@hertznsk

Copy link
Copy Markdown
ContributorAuthor

I mark it with a draft to test it.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add opt-in OpenTelemetry tracing for workflow execution

1 participant

@hertznsk