Attribute Mapping Reference
When MLflow ingests traces from third-party OpenTelemetry instrumentation, it automatically translates framework-specific span attributes into MLflow's standard format. This ensures that key information like span types, inputs/outputs, token usage, and model names display correctly in the MLflow UI regardless of the originating framework.
How Translation Works
When a trace is received via the OTLP endpoint, MLflow runs each span through a series of translators. Each translator understands a specific set of OTel semantic conventions and maps them to MLflow span attributes.
Supported Translations
MLflow includes built-in translators for the following frameworks and conventions:
- OpenTelemetry GenAI Semantic Conventions
- OpenInference (Arize)
- Traceloop / OpenLLMetry
- Langfuse
- Vercel AI SDK
- Spring AI
- Google ADK
- LiveKit Agents
- VoltAgent
Translated Span Attributes
| MLflow Attribute | Where It Appears in the UI |
|---|---|
Span type (mlflow.spanType) | Determines the icon shown next to each span in the span tree (e.g., a model icon for LLM, a wrench icon for TOOL) |
Inputs / Outputs (mlflow.spanInputs, mlflow.spanOutputs) | Displayed in the Inputs / Outputs tab of the span detail panel |
Token usage (mlflow.chat.tokenUsage) | Shown in the trace drawer header and aggregated in the trace table's Tokens column |
Model name (mlflow.llm.model) | Shown in the span detail panel as the model used for the LLM call |
Model provider (mlflow.llm.provider) | Shown alongside the model name (e.g., openai, anthropic) |
Message format (mlflow.message.format) | Controls how inputs/outputs are rendered in the chat UI view |
Mapping Tables
OpenTelemetry GenAI Semantic Conventions
Based on the OTel GenAI semantic conventions.
Span Type (from gen_ai.operation.name):
| Source Value | MLflow Span Type |
|---|---|
chat | CHAT_MODEL |
create_agent | AGENT |
embeddings | EMBEDDING |
execute_tool | TOOL |
generate_content | LLM |
invoke_agent | AGENT |
text_completion | LLM |
response | LLM |
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
gen_ai.input.messages, gen_ai.tool.call.arguments | mlflow.spanInputs |
gen_ai.output.messages, gen_ai.tool.call.result | mlflow.spanOutputs |
Inputs and outputs can also be extracted from span events:
- Input events:
gen_ai.system.message,gen_ai.user.message,gen_ai.assistant.message - Output events:
gen_ai.choice
Token Usage:
| Source Attribute | MLflow Token Field |
|---|---|
gen_ai.usage.input_tokens | input_tokens |
gen_ai.usage.output_tokens | output_tokens |
| (calculated from input + output) | total_tokens |
Model:
| Source Attribute | MLflow Attribute |
|---|---|
gen_ai.response.model | mlflow.llm.model |
gen_ai.request.model | mlflow.llm.model |
gen_ai.provider.name | mlflow.llm.provider |
OpenInference (Arize)
Based on the OpenInference semantic conventions.
Span Type (from openinference.span.kind): Mapped directly to the matching MLflow span type (e.g., LLM → LLM, TOOL → TOOL, AGENT → AGENT, etc.).
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
input.value | mlflow.spanInputs |
output.value | mlflow.spanOutputs |
Token Usage:
| Source Attribute | MLflow Token Field |
|---|---|
llm.token_count.prompt | input_tokens |
llm.token_count.completion | output_tokens |
llm.token_count.total | total_tokens |
Model:
| Source Attribute | MLflow Attribute |
|---|---|
llm.model_name | mlflow.llm.model |
embedding.model_name | mlflow.llm.model |
llm.provider | mlflow.llm.provider |
Traceloop / OpenLLMetry
Based on OpenLLMetry semantic conventions.
Span Type (from traceloop.span.kind):
| Source Value | MLflow Span Type |
|---|---|
workflow | WORKFLOW |
task | TASK |
agent | AGENT |
tool | TOOL |
unknown | UNKNOWN |
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
traceloop.entity.input, gen_ai.prompt.*.content (pattern), gen_ai.completion.*.tool_calls.*.arguments (pattern) | mlflow.spanInputs |
traceloop.entity.output, gen_ai.completion.*.content (pattern) | mlflow.spanOutputs |
Token Usage:
| Source Attribute | MLflow Token Field |
|---|---|
gen_ai.usage.prompt_tokens | input_tokens |
gen_ai.usage.completion_tokens | output_tokens |
llm.usage.total_tokens | total_tokens |
Model Provider:
| Source Attribute | MLflow Attribute |
|---|---|
gen_ai.system | mlflow.llm.provider |
Langfuse
Maps Langfuse observation attributes to MLflow.
Span Type (from langfuse.observation.type):
| Source Value | MLflow Span Type |
|---|---|
generation | LLM |
embedding | EMBEDDING |
tool | TOOL |
retriever | RETRIEVER |
agent | AGENT |
chain | CHAIN |
evaluator | EVALUATOR |
guardrail | GUARDRAIL |
span | UNKNOWN |
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
langfuse.observation.input | mlflow.spanInputs |
langfuse.observation.output | mlflow.spanOutputs |
Vercel AI SDK
Based on Vercel AI SDK telemetry.
Span Type (from ai.operationId):
| Source Value | MLflow Span Type |
|---|---|
ai.generateText | LLM |
ai.generateText.doGenerate | LLM |
ai.toolCall | TOOL |
ai.streamText | LLM |
ai.streamText.doStream | LLM |
ai.generateObject | LLM |
ai.generateObject.doGenerate | LLM |
ai.streamObject | LLM |
ai.streamObject.doStream | LLM |
ai.embed | EMBEDDING |
ai.embed.doEmbed | EMBEDDING |
ai.embedMany | EMBEDDING |
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
ai.prompt, ai.toolCall.args, ai.value / ai.values | mlflow.spanInputs |
ai.response.text, ai.toolCall.result, ai.response.object, ai.embedding / ai.embeddings | mlflow.spanOutputs |
For chat spans (ai.generateText.doGenerate, ai.streamText.doStream), MLflow unpacks all
ai.prompt.* attributes as inputs and all ai.response.* attributes as outputs.
Spring AI
Based on Spring AI using OTel GenAI semantic conventions.
Span Type (from gen_ai.operation.name):
| Source Value | MLflow Span Type |
|---|---|
chat | CHAT_MODEL |
embeddings | EMBEDDING |
Inputs / Outputs:
Spring AI stores inputs and outputs in span events rather than attributes:
| Event Name | Event Attribute | MLflow Attribute |
|---|---|---|
gen_ai.content.prompt | gen_ai.prompt | mlflow.spanInputs |
gen_ai.content.completion | gen_ai.completion | mlflow.spanOutputs |
Token Usage:
| Source Attribute | MLflow Token Field |
|---|---|
gen_ai.usage.input_tokens | input_tokens |
gen_ai.usage.output_tokens | output_tokens |
| (calculated from input + output) | total_tokens |
Google ADK
Based on Google Agent Development Kit telemetry.
Google ADK uses OTel GenAI semantic conventions for span types and token usage. The following additional attributes are mapped for inputs and outputs:
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
gcp.vertex.agent.llm_request, gcp.vertex.agent.tool_call_args | mlflow.spanInputs |
gcp.vertex.agent.llm_response, gcp.vertex.agent.tool_response | mlflow.spanOutputs |
LiveKit Agents
Based on LiveKit Agents telemetry. Inherits GenAI semantic conventions for token usage and event-based message extraction.
Span Type:
LiveKit uses a combination of heuristics to determine span type:
| Condition | MLflow Span Type |
|---|---|
gen_ai.request.model present | LLM |
gen_ai.operation.name matches GenAI mapping | (see GenAI table above) |
lk.retry_count present | LLM |
lk.function_tool* prefix | TOOL |
lk.agent_name, lk.instructions, lk.generation_id | AGENT |
lk.tts*, lk.input_text | UNKNOWN |
lk.user_transcript, lk.transcript_confidence, lk.transcription_delay | UNKNOWN |
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
lk.user_input, lk.user_transcript, lk.chat_ctx, lk.input_text | mlflow.spanInputs |
lk.response.text, lk.response.function_calls | mlflow.spanOutputs |
Also supports GenAI event-based input/output extraction (see GenAI table above).
Token Usage: Same as GenAI semantic conventions (gen_ai.usage.input_tokens, gen_ai.usage.output_tokens).
VoltAgent
Based on VoltAgent telemetry.
Span Type (from span.type, with fallback to entity.type):
| Source Value | MLflow Span Type |
|---|---|
agent | AGENT |
llm | LLM |
tool | TOOL |
memory | MEMORY |
span.type is checked first because child spans inherit entity.type from their parent
agent, which would incorrectly classify LLM/tool spans as AGENT.
Inputs / Outputs:
| Source Attributes | MLflow Attribute |
|---|---|
agent.messages, llm.messages, input | mlflow.spanInputs |
output | mlflow.spanOutputs |
Token Usage:
| Source Attribute | MLflow Token Field |
|---|---|
usage.prompt_tokens or llm.usage.prompt_tokens | input_tokens |
usage.completion_tokens or llm.usage.completion_tokens | output_tokens |
usage.total_tokens or llm.usage.total_tokens | total_tokens |
Session and User Mapping
In addition to span-level attributes, MLflow also maps the following OTel span attributes to trace-level metadata:
| Span Attribute | Trace Metadata Key | Description |
|---|---|---|
session.id | mlflow.trace.session | Session or conversation identifier |
user.id | mlflow.trace.user | Application end-user identifier |
These attributes follow the OTel semantic conventions for sessions and users.
For more details, see Track Users and Sessions.