Background
Retired sub-issue #476 proposed span events for streaming. @planetf1's open work on streaming event types (#902 / #1013, PRs #958 and #942) is the right place for this to land — the bridge between Mellea's internal streaming events and OTel span events.
Scope
Pending @planetf1's streaming-events design, add span events on backend generation spans for:
Optionally surface MELLEA_TRACES_STREAM_SAMPLE_RATE for chunk sampling.
Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Coordinates with #902 / PR #958 — this issue is the consumer side; @planetf1's work is the producer side. Can proceed in parallel with {{NEW-D}}, {{NEW-E}}, {{NEW-F}}, {{NEW-H}}.
Acceptance criteria
Parent epic: #444
Background
Retired sub-issue #476 proposed span events for streaming. @planetf1's open work on streaming event types (#902 / #1013, PRs #958 and #942) is the right place for this to land — the bridge between Mellea's internal streaming events and OTel span events.
Scope
Pending @planetf1's streaming-events design, add span events on backend generation spans for:
gen_ai.choiceor equivalent first-token event (carriesttfb_ms— currently metrics-only).MELLEA_TRACES_STREAM_CHUNKSper refactor: rename tracing env vars to plural and align with OTel semconv #1046's plural convention, to avoid noise).Optionally surface
MELLEA_TRACES_STREAM_SAMPLE_RATEfor chunk sampling.Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Coordinates with #902 / PR #958 — this issue is the consumer side; @planetf1's work is the producer side. Can proceed in parallel with {{NEW-D}}, {{NEW-E}}, {{NEW-F}}, {{NEW-H}}.
Acceptance criteria
Parent epic: #444