Multimodal Telemetry Messages
Message Attributes
tRPC-Agent-Go emits two message attribute families:
gen_ai.input.messagesandgen_ai.output.messagesare deprecated compatibility fields. Their payload shape is kept unchanged for existing telemetry consumers.gen_ai.input.messages.otelandgen_ai.output.messages.otelare the recommended fields for new integrations. Their payload follows an OpenTelemetry-alignedrolepluspartsschema.
The old fields will remain available in this change, but new adapters should read the .otel fields first.
OTel Payload Shape
gen_ai.input.messages.otel is a JSON array of messages:
gen_ai.output.messages.otel is a JSON array of output messages:
Supported part types include:
text: plain text content.uri: URI-backed multimodal content withmodalityand optionalmime_type.blob: base64-encoded binary content withmodalityand optionalmime_type.file: uploaded file references viafile_id.tool_call: assistant tool requests.tool_call_response: tool outputs sent back to the model.reasoning: provider reasoning or thinking content.
Langfuse Conversion
The Langfuse exporter folds messages into langfuse.observation.input / output in this order:
gen_ai.input.messages.otel/gen_ai.output.messages.otel(GenAIrole+parts, passed through for Langfuse to convert)- If
.otelis missing: legacygen_ai.input.messages/gen_ai.output.messages(passed through as-is; output is conversation-shaped and preferred overllm_response) - On chat/generation spans only:
trpc.go.agent.llm_request/llm_response
Jaeger and other generic OTLP backends still read raw span attributes, so their Drop policy differs from Langfuse. See Span Attribute Policy in Observability.