Background
Session-level and act-level spans are currently emitted via direct trace_application(...) calls in mellea/stdlib/session.py and mellea/stdlib/functional.py. This leaks tracing concerns into stdlib.
Replaces retired sub-issue #470.
Scope
Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Can proceed in parallel with {{NEW-E}}, {{NEW-F}}, {{NEW-G}}, {{NEW-H}}, and with PR #1036 rebased onto Phase 1.
Acceptance criteria
Parent epic: #444
Background
Session-level and act-level spans are currently emitted via direct
trace_application(...)calls inmellea/stdlib/session.pyandmellea/stdlib/functional.py. This leaks tracing concerns into stdlib.Replaces retired sub-issue #470.
Scope
tracing_plugins.py. (If no suitable session-lifecycle hook exists, open a small prerequisite issue inmellea/plugins/to add one; prefer reusing existing hooks.)aactspan emission into a plugin hooked on the appropriate pre/post action hook. Preserve existing attributes but addmellea.prefix (per refactor: rename tracing env vars to plural and align with OTel semconv #1046).trace_application,set_span_attributeimports fromstdlib/session.pyandstdlib/functional.py.gen_ai.conversation.idon session spans (overlaps with OTel omissions/gaps: chat content events, gen_ai.conversation.id, prompt templates, error status #1035 — coordinate with PR feat(telemetry): close five OTel GenAI semantic convention emission gaps (#1035) #1036).Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Can proceed in parallel with {{NEW-E}}, {{NEW-F}}, {{NEW-G}}, {{NEW-H}}, and with PR #1036 rebased onto Phase 1.
Acceptance criteria
mellea/stdlib/no longer imports frommellea.telemetry.tracing.Parent epic: #444