Skip to main content

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:

Translated Span Attributes

MLflow AttributeWhere 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 ValueMLflow Span Type
chatCHAT_MODEL
create_agentAGENT
embeddingsEMBEDDING
execute_toolTOOL
generate_contentLLM
invoke_agentAGENT
text_completionLLM
responseLLM

Inputs / Outputs:

Source AttributesMLflow Attribute
gen_ai.input.messages, gen_ai.tool.call.argumentsmlflow.spanInputs
gen_ai.output.messages, gen_ai.tool.call.resultmlflow.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 AttributeMLflow Token Field
gen_ai.usage.input_tokensinput_tokens
gen_ai.usage.output_tokensoutput_tokens
(calculated from input + output)total_tokens

Model:

Source AttributeMLflow Attribute
gen_ai.response.modelmlflow.llm.model
gen_ai.request.modelmlflow.llm.model
gen_ai.provider.namemlflow.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., LLMLLM, TOOLTOOL, AGENTAGENT, etc.).

Inputs / Outputs:

Source AttributesMLflow Attribute
input.valuemlflow.spanInputs
output.valuemlflow.spanOutputs

Token Usage:

Source AttributeMLflow Token Field
llm.token_count.promptinput_tokens
llm.token_count.completionoutput_tokens
llm.token_count.totaltotal_tokens

Model:

Source AttributeMLflow Attribute
llm.model_namemlflow.llm.model
embedding.model_namemlflow.llm.model
llm.providermlflow.llm.provider

Traceloop / OpenLLMetry

Based on OpenLLMetry semantic conventions.

Span Type (from traceloop.span.kind):

Source ValueMLflow Span Type
workflowWORKFLOW
taskTASK
agentAGENT
toolTOOL
unknownUNKNOWN

Inputs / Outputs:

Source AttributesMLflow 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 AttributeMLflow Token Field
gen_ai.usage.prompt_tokensinput_tokens
gen_ai.usage.completion_tokensoutput_tokens
llm.usage.total_tokenstotal_tokens

Model Provider:

Source AttributeMLflow Attribute
gen_ai.systemmlflow.llm.provider

Langfuse

Maps Langfuse observation attributes to MLflow.

Span Type (from langfuse.observation.type):

Source ValueMLflow Span Type
generationLLM
embeddingEMBEDDING
toolTOOL
retrieverRETRIEVER
agentAGENT
chainCHAIN
evaluatorEVALUATOR
guardrailGUARDRAIL
spanUNKNOWN

Inputs / Outputs:

Source AttributesMLflow Attribute
langfuse.observation.inputmlflow.spanInputs
langfuse.observation.outputmlflow.spanOutputs

Vercel AI SDK

Based on Vercel AI SDK telemetry.

Span Type (from ai.operationId):

Source ValueMLflow Span Type
ai.generateTextLLM
ai.generateText.doGenerateLLM
ai.toolCallTOOL
ai.streamTextLLM
ai.streamText.doStreamLLM
ai.generateObjectLLM
ai.generateObject.doGenerateLLM
ai.streamObjectLLM
ai.streamObject.doStreamLLM
ai.embedEMBEDDING
ai.embed.doEmbedEMBEDDING
ai.embedManyEMBEDDING

Inputs / Outputs:

Source AttributesMLflow Attribute
ai.prompt, ai.toolCall.args, ai.value / ai.valuesmlflow.spanInputs
ai.response.text, ai.toolCall.result, ai.response.object, ai.embedding / ai.embeddingsmlflow.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 ValueMLflow Span Type
chatCHAT_MODEL
embeddingsEMBEDDING

Inputs / Outputs:

Spring AI stores inputs and outputs in span events rather than attributes:

Event NameEvent AttributeMLflow Attribute
gen_ai.content.promptgen_ai.promptmlflow.spanInputs
gen_ai.content.completiongen_ai.completionmlflow.spanOutputs

Token Usage:

Source AttributeMLflow Token Field
gen_ai.usage.input_tokensinput_tokens
gen_ai.usage.output_tokensoutput_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 AttributesMLflow Attribute
gcp.vertex.agent.llm_request, gcp.vertex.agent.tool_call_argsmlflow.spanInputs
gcp.vertex.agent.llm_response, gcp.vertex.agent.tool_responsemlflow.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:

ConditionMLflow Span Type
gen_ai.request.model presentLLM
gen_ai.operation.name matches GenAI mapping(see GenAI table above)
lk.retry_count presentLLM
lk.function_tool* prefixTOOL
lk.agent_name, lk.instructions, lk.generation_idAGENT
lk.tts*, lk.input_textUNKNOWN
lk.user_transcript, lk.transcript_confidence, lk.transcription_delayUNKNOWN

Inputs / Outputs:

Source AttributesMLflow Attribute
lk.user_input, lk.user_transcript, lk.chat_ctx, lk.input_textmlflow.spanInputs
lk.response.text, lk.response.function_callsmlflow.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 ValueMLflow Span Type
agentAGENT
llmLLM
toolTOOL
memoryMEMORY
note

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 AttributesMLflow Attribute
agent.messages, llm.messages, inputmlflow.spanInputs
outputmlflow.spanOutputs

Token Usage:

Source AttributeMLflow Token Field
usage.prompt_tokens or llm.usage.prompt_tokensinput_tokens
usage.completion_tokens or llm.usage.completion_tokensoutput_tokens
usage.total_tokens or llm.usage.total_tokenstotal_tokens

Session and User Mapping

In addition to span-level attributes, MLflow also maps the following OTel span attributes to trace-level metadata:

Span AttributeTrace Metadata KeyDescription
session.idmlflow.trace.sessionSession or conversation identifier
user.idmlflow.trace.userApplication end-user identifier

These attributes follow the OTel semantic conventions for sessions and users.

For more details, see Track Users and Sessions.