Skip to content

feat(o11y): self-tracing via runtime spans, adapter emit spans, and OTLP trace export (PIPE-1066) - #286

Open
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1066-per-instance-metricsfrom
dylanmyers/pipe-1066-self-tracing
Open

feat(o11y): self-tracing via runtime spans, adapter emit spans, and OTLP trace export (PIPE-1066)#286
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1066-per-instance-metricsfrom
dylanmyers/pipe-1066-self-tracing

Conversation

@Dylan-M

@Dylan-M Dylan-M commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Proposed Change

Adds blitz's session-level self-tracing. The runtime emits a root blitz.session span
from Start to Stop, with a child blitz.generator.run span per module. Consumer adapters
emit gated blitz.emit.* spans. Trace export is opt-in through the new telemetry.traces
config. With an OTLP endpoint set, spans export there. Without one, the nil TracerProvider
means spans are created and dropped by the global no-op provider. PerBatchSpans gates
the higher-volume per-emit spans and is off by default.

Each setting is exposed on all three config surfaces, like every other blitz option: the
telemetry.traces config block, BLITZ_TELEMETRY_TRACES_* env vars, and
--telemetry-traces-* flags.

How to validate

  • Point blitz at any OTLP gRPC collector (its debug exporter shows the spans). Run:
    go run ./cmd/blitz --generator-type apache-common --generator-apache-common-rate 1s --output-type stdout --telemetry-traces-otlpendpoint localhost:4317 --telemetry-traces-insecure
  • Confirm a blitz.session span with a child blitz.generator.run span arrives at the
    collector.
  • Drop the two --telemetry-traces-* flags and confirm blitz runs with no spans exported.
  • go test ./internal/runtime/... ./internal/telemetry/traces/... ./output/... covers the
    span lifecycle, the OTLP exporter seams, and the emit-span gating.
  • go test ./internal/config/... covers the flag, env, and default for each new setting.
Checklist
  • Changes are tested
  • CI has passed

…TLP trace export (PIPE-1066)

Assisted-by: Claude Opus 4.8
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1066-self-tracing branch from b122971 to cb115bd Compare August 14, 2026 19:22
@Dylan-M
Dylan-M force-pushed the dylanmyers/pipe-1066-per-instance-metrics branch from 9aee681 to bad99f9 Compare August 14, 2026 19:22
Sign up for free to 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.

1 participant