feat(telemetry): emit gen_ai.input/output.messages content events from tracing plugin (post-#1045)
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- observability-sre, python
- Área
- observability
Línea de trabajo
Blocked until #1045 merges, since BackendTracingPlugin and GenerationPostCallPayload do not exist yet. Once they do, start in mellea/telemetry/tracing.py, where is_content_tracing_enabled() and add_span_event() already exist, and read how the plugin receives the conversation and output. Done means content span events are emitted only when the opt-in flag is set, with content off by default. Confirm the env var name first, since #1046 renames it.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Gap 5 from #1035: Mellea does not emit chat content span events, so the conversation transcript is invisible in OTel backends. Metadata (tokens, model, latency) is present on backend spans but prompts and responses are not.
Per the OTel GenAI semconv, content capture should use span events with these names, each carrying structured role + content:
gen_ai.system.messagegen_ai.user.messagegen_ai.assistant.messagegen_ai.tool.messagegen_ai.choice
Additionally, OpenInference-compatible system instruction capture:
gen_ai.system_instructions
Why deferred from PR #1036
The component-level approach (passing conversation/output_text through finalize_backend_span) required changes to all 5 backends and was withdrawn as too much churn. After #1045, BackendTracingPlugin receives GenerationPostCallPayload which contains the conversation and output — no backend changes needed at all.
Approach
After #1045 lands and BackendTracingPlugin exists:
- In
BackendTracingPlugin, checkis_content_tracing_enabled()before emitting. - If enabled, call the existing
add_span_event()helper (already wired inmellea/telemetry/tracing.pyfrom PR #1036) to emitgen_ai.user.message,gen_ai.assistant.message, etc. fromGenerationPostCallPayload. - Content capture remains off by default — opt in via
MELLEA_TRACE_CONTENT(renamedMELLEA_TRACES_CONTENTunder #1046) orOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT.
The infrastructure is already in place from PR #1036: is_content_tracing_enabled(), add_span_event(), and the _TRACE_CONTENT_ENABLED flag.
Prerequisites
- #1045 (Phase 1 plugin/hook pattern) must merge first —
BackendTracingPluginandGenerationPostCallPayloadare not available until then.
Related
- Epic #444 Phase 2 — alongside #1035, #1067
- PR #1036 (infrastructure landed; content emission deferred)
- #1046 (env var rename —
MELLEA_TRACE_CONTENT→MELLEA_TRACES_CONTENT)
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 161
- Merge medio
- 4 d 3 h
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de generative-computing/mellea
-
bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknownAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
generative-computing/mellea#1864 ·
Los mantenedores suelen responder en 3 días
-
bug: instruct() and react() replay tool-call turns without tool_callsPosiblemente ocupada @simonyang08 la tomó hace 21 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
generative-computing/mellea#1784 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examplesPosiblemente ocupada @madhusudhan1260 la tomó hace 18 días. Abiertogood first issue p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
generative-computing/mellea#1780 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
area/telemetry enhancement p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
generative-computing/mellea#1210 ·
Los mantenedores suelen responder en 3 días
-
Add requirement priorityAbiertoarea/requirement area/stdlib enhancement p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
generative-computing/mellea#31 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
Todos los issues de generative-computing/mellea
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
OpenFreeEnergy/openfe#2371 ·
Los mantenedores suelen responder en 2 días
-
HMDB's smiles file writes "None" for metabolites with an empty <smiles/> (file not currently used)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
NCATSTranslator/Babel#1269 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Medio día Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
404 on sample dataAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
bcgov/nr-hydrometric-rating-curve#443 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100