You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracing env vars need an umbrella enable flag and don't honor the signal-specific OTel endpoint variable. Some attribute names predate the current OTel GenAI semconv.
Env var naming decision (plural MELLEA_TRACES_*)
The OTel standard partner variable is plural: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT. For internal consistency with that and with the existing MELLEA_METRICS_* vars, this issue uses plural MELLEA_TRACES_*.
This diverges from the logging pillar, which landed singular MELLEA_LOG_* in PR #907 (intentional at the time, lightly discussed). The cross-pillar inconsistency between MELLEA_METRICS_* (plural), MELLEA_LOG_* (singular), and MELLEA_TRACES_* (plural, this issue) is a real wart — a separate fix issue has been filed to address it. This issue does not block on that conversation.
Keep the old MELLEA_TRACE_* names working with a deprecation warning for one release. The OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT alias added by #1036 alongside MELLEA_TRACE_CONTENT stays (OTel standard).
Add mellea. prefix to application-span attributes that currently have bare names in stdlib/functional.py (e.g., action_type, has_requirements, strategy_type, has_format, tool_calls, num_generate_logs, sampling_success, response, response_length).
Init timing — switch to lazy init so env changes after import are respected, matching mellea/telemetry/logging.py's pattern. This removes the need for importlib.reload(mellea.telemetry.tracing) in tests.
Phase & dependencies
Phase 1 (foundation). Depends on #1045. Blocks Phase 2 and Phase 3 once finished. Likely lands in the same PR as #1045 and {{NEW-C}}.
Related
{{PILLAR-NAMING}} — separate fix proposal to reconcile pillar env var naming across all three telemetry pillars. Non-blocking.
Acceptance criteria
New MELLEA_TRACES_* env vars work; old MELLEA_TRACE_* names warn and continue working (one-release deprecation).
Background
Tracing env vars need an umbrella enable flag and don't honor the signal-specific OTel endpoint variable. Some attribute names predate the current OTel GenAI semconv.
Env var naming decision (plural
MELLEA_TRACES_*)The OTel standard partner variable is plural:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT. For internal consistency with that and with the existingMELLEA_METRICS_*vars, this issue uses pluralMELLEA_TRACES_*.This diverges from the logging pillar, which landed singular
MELLEA_LOG_*in PR #907 (intentional at the time, lightly discussed). The cross-pillar inconsistency betweenMELLEA_METRICS_*(plural),MELLEA_LOG_*(singular), andMELLEA_TRACES_*(plural, this issue) is a real wart — a separate fix issue has been filed to address it. This issue does not block on that conversation.Scope
Env vars — rename/consolidate:
MELLEA_TRACE_APPLICATION+MELLEA_TRACE_BACKENDMELLEA_TRACES_ENABLED(umbrella)MELLEA_TRACES_OTLP(explicit toggle)MELLEA_TRACE_CONSOLEMELLEA_TRACES_CONSOLEMELLEA_TRACE_CONTENT(added by PR #1036)MELLEA_TRACES_CONTENTOTEL_EXPORTER_OTLP_TRACES_ENDPOINT(signal-specific endpoint)Keep the old
MELLEA_TRACE_*names working with a deprecation warning for one release. TheOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTalias added by #1036 alongsideMELLEA_TRACE_CONTENTstays (OTel standard).Attributes — align to current semconv:
gen_ai.systemwithgen_ai.provider.name(metrics already uses this; @planetf1's PR feat(telemetry): close five OTel GenAI semantic convention emission gaps (#1035) #1036 is already doing dual-emission — this issue completes it by removing the legacy name after the deprecation window).mellea.prefix to application-span attributes that currently have bare names instdlib/functional.py(e.g.,action_type,has_requirements,strategy_type,has_format,tool_calls,num_generate_logs,sampling_success,response,response_length).Init timing — switch to lazy init so env changes after import are respected, matching
mellea/telemetry/logging.py's pattern. This removes the need forimportlib.reload(mellea.telemetry.tracing)in tests.Phase & dependencies
Phase 1 (foundation). Depends on #1045. Blocks Phase 2 and Phase 3 once finished. Likely lands in the same PR as #1045 and {{NEW-C}}.
Related
Acceptance criteria
MELLEA_TRACES_*env vars work; oldMELLEA_TRACE_*names warn and continue working (one-release deprecation).gen_ai.systemreplaced withgen_ai.provider.nameeverywhere (after feat(telemetry): close five OTel GenAI semantic convention emission gaps (#1035) #1036 lands dual-emission).OTEL_EXPORTER_OTLP_TRACES_ENDPOINThonored when set.importlib.reload.docs/docs/evaluation-and-observability//docs/dev/telemetry.mdas applicable) updated.Parent epic: #444