agents.deploy(), and MLflow-traced code in notebooks or jobs.
Prerequisites
- Databricks workspace with Model Serving, or a local/notebook environment with
mlflow>=3.11(this guide was validated with MLflow 3.16; dual export needs 3.4+) - A HoneyHive ingestion API key from Settings > Project > API Keys, on the Ingestion tab
Provider host and OTLP traces URL
HoneyHive routes OTLP ingestion through your deployment’s API host. Replace<provider-host> with the hostname shown in your HoneyHive dashboard or API settings:
Environment variables
Set these on the agent process before any MLflow tracing starts. The first three are required:
Dual export uses
MLFLOW_TRACE_ENABLE_OTLP_DUAL_EXPORT (MLflow 3.4+). Databricks’ OpenTelemetry export page currently shows MLFLOW_ENABLE_DUAL_EXPORT, which MLflow does not read - use the name above.
If you previously set MLFLOW_ENABLE_OTEL_GENAI_SEMCONV=true, remove it and restart the endpoint. See GenAI semantic conventions for what that setting changes.
If both OTEL_EXPORTER_OTLP_TRACES_PROTOCOL and OTEL_EXPORTER_OTLP_PROTOCOL are set, the traces-specific variable wins. Unset any leftover OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc so http/protobuf takes effect.
Configure a Model Serving agent
Pass the variables throughenvironment_vars on agents.deploy():
{{secrets/scope/key}} instead of pasting the API key into a notebook.
For agents already deployed, add the same variables under Serving > endpoint > Edit > Environment variables, then redeploy or restart the endpoint.
Notebook or local smoke test
mlflow.openai.autolog() creates the model span that carries inputs, outputs, and tokens:
MLFLOW_TRACE_ENABLE_OTLP_DUAL_EXPORT=true. Dual export writes the MLflow half to the active tracking URI. Databricks notebooks and Model Serving use the workspace by default. Outside Databricks, MLflow writes to a local tracking store unless you set a tracking URI with mlflow.set_tracking_uri(...).
mlflow[databricks] when you also want traces in the workspace MLflow UI.
What HoneyHive receives
HoneyHive maps each MLflow span type to an event type:
A tool-calling agent produces this shape:
Each span currently appears as its own session row in HoneyHive. Parent/child links are kept through OTel parent span IDs. To see one agent run, filter Traces by the
trace_id metadata field, or by service.name.Verify traces in HoneyHive
- Invoke the agent (or run the smoke test above).
- Open Traces for the project tied to your API key.
- Look for events with
sourceset tootlpand metadata such astelemetry.sdk.name=mlflow,instrumentor=MLflow, and yourOTEL_SERVICE_NAME. - Open a model span and confirm the model inputs, outputs, and token counts appear.
- Confirm the endpoint ends with
/opentelemetry/v1/tracesand uses your HoneyHive API host. - Confirm
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf, and thatOTEL_EXPORTER_OTLP_TRACES_PROTOCOLis unset or alsohttp/protobuf. - Confirm
Authorization=Bearer <HH_INGESTION_API_KEY>matches the target project. - Confirm
MLFLOW_ENABLE_OTLP_EXPORTERis not set tofalse. - Confirm the serving endpoint can reach HoneyHive over outbound HTTPS.
Export modes
GenAI semantic conventions
MLflow 3.11+ can translate its spans to OpenTelemetry GenAI semantic conventions (gen_ai.* attributes) when you set MLFLOW_ENABLE_OTEL_GENAI_SEMCONV=true. HoneyHive reads both formats, but leave this off for agents. The translation drops detail that MLflow’s default export keeps:
- Agent and chain spans arrive as
invoke_agentwith no inputs or outputs - Tool spans arrive as
execute_toolwithout the tool name - Values you set with
set_inputs/set_outputson a plainmlflow.start_spanspan are dropped
Related
OpenTelemetry concepts
How HoneyHive stores OTLP traces and GenAI span attributes
Tracing introduction
Sessions, event types, and trace hierarchy in HoneyHive
Enrich your traces
Add metadata, user properties, and feedback to traces
Custom spans
Add HoneyHive spans around business logic in your application