How LiteLLM sends traces to MLflow or Phoenix
A platform team running a LiteLLM gateway that must keep traces and evaluations in infrastructure it controls has two supported callbacks to choose from. LiteLLM can send request traces to MLflow through the mlflow callback or mlflow.litellm.autolog(), and it can send them to Phoenix through the arize_phoenix callback. Both paths use OpenTelemetry-compatible tracing, so the trace data follows a common structure, but the store that receives it, and the operations you own around it, differ. MLflow is licensed under Apache-2.0 and can be run as a self-hosted server with mlflow server. Phoenix is licensed under the Elastic License 2.0, which is source-available rather than OSI-approved open source, and it is free to self-host with no feature limits. Confirm the license terms with your legal team before you standardize on either tool.
The distinction between open-source Phoenix and the Arize AX backend matters most for data residency. The arize callback sends traces to Arize's managed Arize AX platform, while the arize_phoenix callback sends them to a Phoenix instance you run. The Phoenix documentation states that traces, prompts and data stay in your infrastructure, including air-gapped deployments. Decide which backend holds prompt content before any callback is enabled, and confirm the storage backend for each. Phoenix starts on SQLite by default and supports PostgreSQL through PHOENIX_SQL_DATABASE_URL, so plan the database for any multi-user installation. MLflow's self-hosted default backend store is also SQLite, and the MLflow documentation suggests PostgreSQL for scaling.
What you need before enabling the callbacks
Enabling the MLflow or Phoenix callbacks is the last step, not the first. The proxy, its database, the trace store and the network path between them each need to be in place and confirmed, and the exact release of each component should be checked against its releases page for your environment.
Confirm the LiteLLM release line
Pick the LiteLLM proxy version from the GitHub releases page and confirm it sits on a release line that is still supported. LiteLLM maintains support for the four most recent stable minor versions for both open source and Enterprise deployments, so check the release you plan to run against the callback settings in the LiteLLM docs for MLflow or Phoenix. Pin the image tag so a routine redeploy does not change callback behavior.
- Supported minor versions
- 4
PostgreSQL behind the proxy
Virtual keys, budgets and spend logs need PostgreSQL, so the gateway database must exist before any callback is tested. Confirm the database is reachable from every proxy pod and that backups cover it. Keep the trace store separate from this database, since MLflow and Phoenix each keep their own tables and retention settings.
LiteLLM production guideRedis once the gateway scales out
Once more than one proxy instance runs, LiteLLM requires Redis 7.0 or newer for shared rate limits, router state and cache. Callback traffic does not replace this requirement. Check that every replica sends traces to the same trace store, so a request that fails over to another pod still appears in one place.
MLflow 3.x with a SQL backend
Use MLflow 3.x for the trace store and confirm the exact version on the MLflow releases page for your environment. Do not rely on the default SQLite backend for a shared server, since it is a local file. Point the backend store at PostgreSQL, and plan artifact storage on local disk, S3, GCS or Azure Blob Storage before the server goes live. Workspaces, if you need them, also require a SQL database backend.
MLflow self-hosting docsPhoenix deployment and backend choice
Phoenix starts on a file-based SQLite database by default, which suits a single-user trial. For a shared deployment, set PHOENIX_SQL_DATABASE_URL or the separate connection variables to PostgreSQL. Confirm the Phoenix version on its releases page, since the project publishes releases several times a week, and record which version your environment runs.
Phoenix configuration docsNetwork paths and secret handling
Open outbound paths from the proxy to the MLflow or Phoenix endpoint, and test them from the same subnet and pod network the proxy uses. Keep LITELLM_MASTER_KEY, which must start with sk-, and any trace store credentials in a secret manager rather than in config files. Restrict who can read the callback configuration, because it contains the endpoint and credentials used to write traces.
Configure the MLflow and Phoenix callbacks in order
This sequence takes a self-hosted trace store from first start to a verified LiteLLM trace, with each step closing on a check you can repeat. Follow it in one non-production environment before enabling the callbacks for shared gateway traffic.
Choose and deploy the trace store
Decide whether MLflow or Phoenix (or both) will receive traces, then deploy that server in infrastructure you control. For MLflow, start the server with mlflow server, and for Phoenix, use one of the self-hosting methods the Phoenix docs list, such as Docker, Kubernetes or Helm. Both start with a local SQLite database by default, so for anything beyond a pilot, point Phoenix at PostgreSQL through PHOENIX_SQL_DATABASE_URL and MLflow at a SQL backend store, and set artifact storage to S3, GCS or Azure Blob Storage. Check that the server's UI loads over the internal network and that you can create or see an experiment or project.
Set authentication on the trace server
Before any gateway traffic reaches the trace store, enable authentication. MLflow supports basic HTTP authentication, SSO and custom authentication plugins, and Phoenix supports OAuth2, LDAP and local accounts with role-based permissions. Create a dedicated service identity for LiteLLM with write access only to the target experiment or project, and confirm that an unauthenticated request to the tracking endpoint is rejected. Your identity team should confirm which option fits your directory before this step is closed.
Add the callback names to LiteLLM configuration
In the LiteLLM proxy configuration, add the callback for each store you use. For MLflow, use the mlflow callback or mlflow.litellm.autolog() as described in the LiteLLM MLflow docs. For Phoenix, use the arize_phoenix callback, and use the arize callback only if you also send traces to Arize AX, since both can be enabled together. Keep these settings in the same configuration-as-code repository as the rest of the gateway. Check it by restarting a single proxy instance in staging and confirming it starts without callback errors in the logs.
Pass endpoint and credentials from a secret manager
Supply the tracking endpoint, the service identity and its password or token as environment variables sourced from your secret manager rather than from the configuration file. Keep LITELLM_MASTER_KEY in the same store, since LiteLLM requires it to start with sk-. Confirm the trace server URL matches the environment and that the secret is not written to container images, Helm values committed to source control or startup logs. A reviewer should be able to find each secret's name and owner in your inventory.
Send a tagged test request
Send one request through the LiteLLM gateway with a known metadata tag, such as a unique value in the request metadata that is not used by any real workload (for example, a tag like callback-test-001 in an illustrative setup). Use an approved model and a key created for testing, so spend and budget limits apply as they would in production. Record the request ID and the time you sent it so you can search for it in the trace store.
Confirm the trace lands in the correct experiment or project
Open the MLflow experiment or Phoenix project that you configured and search for the tag or request ID from the test. Check that the trace shows the model call, timing and token fields, and that it sits in the intended experiment or project rather than a default one. If nothing appears, check the callback name, the endpoint and the service identity's permissions in the server logs before retrying.
Verify no provider keys appear in the payload
Inspect the stored trace and its attributes for the provider API key, LITELLM_MASTER_KEY, virtual key values and the trace server password. Check request headers, metadata and any environment values that the callback may have captured. Also decide, with the data owner, whether prompt and response bodies should be stored at all, since that is a separate setting. Close this step only when the search finds none of these secrets, and repeat the check after any callback or library upgrade.
MLflow, Phoenix or Arize AX: which backend fits
MLflow fits best when your organization already runs MLflow for model experiments, evaluation or a model registry. It is licensed under Apache-2.0, so self-hosting and internal redistribution carry no license fee or usage restriction beyond the license terms themselves. LiteLLM connects through mlflow.litellm.autolog() or the mlflow callback, and MLflow Tracing is OpenTelemetry-compatible and supports the GenAI semantic conventions.
- Existing platform reuse: Traces, evaluation runs and prompts sit next to the ML work your data scientists already track.
- License position: Apache-2.0 is an OSI-approved open source license, which simplifies legal review.
- Self-hosting path:
mlflow serverstarts with SQLite by default, so plan PostgreSQL and artifact storage in S3, GCS or Azure Blob before production use. - Access model: Basic HTTP authentication, SSO and custom plugins are available. Workspace-level permissions require a SQL backend.
- Operating burden: You own backup, upgrades and scaling of the MLflow server alongside the gateway.
Confirm with your platform team whether MLflow is already governed in your environment, since adding a second ML tool to operate is the main cost.",
Self-hosted Phoenix suits teams that want OpenInference-based LLM tracing and evaluations inside their own infrastructure. Phoenix is free to self-host with no feature limitations or usage limits, and traces, prompts and data stay in your environment, including air-gapped deployments. Its license is the Elastic License 2.0 (ELv2), which is source-available rather than OSI-approved open source.
- Restriction on hosting: ELv2 forbids providing Phoenix to third parties as a hosted or managed service, so a SaaS vendor cannot offer your Phoenix instance as part of its product without a separate arrangement.
- Internal use: Running Phoenix for your own staff and systems falls outside that restriction, but have counsel confirm the boundary for your structure.
- License key circumvention: ELv2 also forbids circumventing license key functionality, which matters if you modify the code.
- Storage: Phoenix starts with SQLite by default and supports PostgreSQL through
PHOENIX_SQL_DATABASE_URLor separate connection variables. - Access: OAuth2, LDAP and local accounts with role-based permissions are supported.
Check the LICENSE file against your planned use before standardizing on Phoenix.
Arize AX is the managed Arize platform. The same OpenTelemetry and OpenInference instrumentation that works with Phoenix also works with Arize AX, so the LiteLLM side needs the arize callback rather than a rebuilt pipeline. Choosing AX moves hosting, upgrades and storage to the vendor, which changes where your prompt data is processed and who answers for availability.
- Callback choice: LiteLLM uses the
arizecallback for Arize AX and thearize_phoenixcallback for open-source Phoenix, and both can be enabled together. - Data location: Traces and prompts are sent to a managed service, so review the data processing terms and region options before enabling it.
- Operations: The vendor operates the backend, which reduces platform work but adds a vendor dependency.
- Cost model: Ask Arize for current pricing and tier limits in writing, since this guide does not state them.
- Migration: Because instrumentation is shared, moving between Phoenix and AX is mostly a callback and endpoint change, but historical data does not move automatically.
Confirm the hosting region, retention and sub-processor terms before sending prompt data to any managed backend.
The right backend depends on what you already run and what your legal and data teams will accept. Start by asking whether MLflow is already in production, whether prompt data may leave your environment, and whether a source-available license passes review. The answers usually settle the choice before any technical comparison.
- Existing tools: If MLflow already holds your evaluation history, extending it avoids a second store.
- Data residency: Air-gapped or strict residency requirements point to self-hosted Phoenix or MLflow, not a managed service.
- License review: Apache-2.0 and ELv2 need different approvals, so involve legal early.
- Operating capacity: Each self-hosted option needs database, backup and upgrade ownership.
- Dual use: LiteLLM can send to more than one callback, so teams can test a backend without replacing another.
Write the chosen backend, license review outcome and data location into your architecture record before enabling callbacks in production.
How LiteLLM request fields map to MLflow and Phoenix trace data
This table compares how common LiteLLM request fields appear in MLflow traces, which follow OpenTelemetry GenAI conventions, and in Phoenix traces, which use OpenInference attributes. Read each row as a question to answer before go-live: does the field arrive automatically or need a metadata tag, and what name does your backend store it under. Treat every field name as unconfirmed until you check the current LiteLLM, MLflow and Phoenix documentation for the versions you run.
| Request field | MLflow trace (GenAI conventions) | Phoenix trace (OpenInference) |
|---|---|---|
| Model name | Requested and resolved model on the LLM call span; confirm both values appear | Model name on the LLM span; check that router aliases resolve to the provider model |
| Virtual key alias | Not a standard field; send the alias as metadata and never the key value | Not a standard field; send the alias as metadata and never the key value |
| Team | Not a standard field; send as a metadata tag and confirm it reaches the trace | Not a standard field; send as metadata or a span attribute and confirm filtering works |
| User identifier | Send as metadata; use a pseudonymous ID rather than a raw email address | Send as metadata; pseudonymize where your privacy policy requires it |
| Token counts | Recorded as usage on the trace; confirm totals match provider invoices | Recorded as token count attributes on the LLM span; confirm totals match provider invoices |
| Request and response content | Present only if content capture is enabled; plan masking before export | Present as input and output messages only if enabled; plan masking before export |
| Latency and error status | Span timing and error status; confirm failed calls produce error spans | Span timing and error status; confirm failed calls appear with error details |
| Custom tags | Mapped to trace tags; confirm names, value types and length limits | Mapped to span attributes; keep value cardinality low so filters stay usable |
How a request flows from client to trace store
The request starts in the client application, which calls the LiteLLM proxy with a virtual key. The proxy checks that key against PostgreSQL and, when more than one instance runs, shares rate limits and router state through Redis, then forwards the call to the model provider. The LiteLLM callback sends the trace for that call to MLflow or Phoenix, which stores it inside the trust boundary you control. Check that the trace store and the proxy sit on the same side of that boundary as your data.
Request path from client to trace store, with the trust boundary around self-hosted components.
Protecting prompts and credentials in the trace store
Traces from LiteLLM can contain full prompts, responses, user identifiers and sometimes credentials, so the MLflow or Phoenix store deserves the same access review as the gateway itself. The cards below cover authentication, the master key, who can read traces, where artifacts are kept, how long they stay, and whether prompt bodies should be logged at all.
MLflow authentication options
A self-hosted MLflow server supports basic HTTP authentication, SSO and custom authentication plugins. Basic HTTP auth is the simplest option but gives every authenticated user the same access, so check whether your team needs per-user identity before choosing it. Confirm which option your MLflow version supports for the SSO path your identity provider uses, and test that the LiteLLM callback can still write traces after you turn authentication on.
MLflow self-hosting docsPhoenix OAuth2, LDAP and local accounts
Self-hosted Phoenix supports OAuth2, LDAP and local accounts with role-based permissions. Local accounts are fine for a pilot but create a separate password store to manage, rotate and remove when people leave. Map Phoenix roles to who actually needs to open prompt content, and confirm the setting names in the Phoenix configuration docs before rollout.
Phoenix configuration docsKeeping the master key out of config files
LITELLM_MASTER_KEY must start with sk- and should live in a secret manager, not in a values file or container image. Use the same discipline for the MLflow and Phoenix credentials the callbacks use, so that a leaked gateway config does not also expose the trace store. Check that the key is injected at runtime and that rotation does not require editing committed manifests.
Limiting who reads prompt traces
Traces often show full user prompts and model outputs, which can be more sensitive than the database rows behind them. Decide which teams can open experiments, traces and datasets, and separate projects or experiments by data classification where your tooling allows it. Test with a non-administrator account to confirm that a developer cannot see another team's traces.
Artifact storage in S3, GCS or Azure Blob
MLflow stores artifacts on local disk or in S3, GCS or Azure Blob Storage, which means copies of trace-related data sit in buckets with their own access policies. Confirm bucket encryption, public access blocking, and that the service identity has only the object permissions it needs. Ask your storage team how deletions and object versions behave, because deleting a trace in the UI may not remove every stored copy.
Retention and prompt logging decisions
Set a written retention period for traces and artifacts that matches your privacy and audit obligations, and apply it to both the database and the bucket. Before enabling the callbacks, decide whether prompt and response bodies need to be stored at all, or whether metadata alone meets the need. Masking content before it reaches the callback is safer than deleting it later from several stores.
Why traces are missing or incomplete
This table lists the failures that most often leave MLflow or Phoenix traces missing or incomplete behind LiteLLM, with the likely cause and the fix for each. Check the rows in order when a request does not appear in the trace store, or when one request shows up more than once.
| Symptom | Likely cause | Fix |
|---|---|---|
| No traces after a config change | The callback was removed or renamed in the LiteLLM config, or the proxy was not restarted or reloaded after the edit | Confirm the callback name in the success and failure callback settings, restart the proxy, then send one test request and check the trace store for it |
| Traces missing from MLflow | The tracking URI points at the wrong server, or the client has no credentials for a server that requires authentication | Set the tracking URI to the server the team actually uses, store credentials in the proxy's secret manager, and test the connection from the proxy container |
| Workspace or experiment errors in MLflow | Workspaces are enabled on a server that uses SQLite, which the workspace feature does not support | Move the MLflow backend store to a SQL database such as PostgreSQL before turning on workspaces and workspace-level permissions |
| Phoenix slows or loses data under load | Phoenix runs on its default SQLite database, which suits small tests more than sustained concurrent writes | Point Phoenix at PostgreSQL through its database URL settings, then load test with production-like traffic before go-live |
| Traces dropped during a trace store outage | The trace store is unreachable, and the callback sends data to it without a durable buffer in between | Confirm the callback behavior when the store is down, monitor the store's availability, and define how the gateway should be restored and whether gaps are acceptable |
| Duplicate traces for one request | The MLflow and Phoenix callbacks are both enabled, or the same callback is listed twice, so each request is exported twice | Review the callback list, keep only the backends you intend to use, and compare trace IDs to confirm one record per request |
Questions buyers ask before connecting MLflow or Phoenix
Which should I choose, MLflow or Phoenix, for LiteLLM traces?
Choose MLflow if you also want experiment tracking, a model registry or a single platform for evaluation and prompt management across ML and LLM work, since its README describes an AI engineering platform covering observability, evaluation, prompt management and an AI Gateway. Choose Phoenix if your main need is LLM tracing and evaluation with OpenInference instrumentation and no license limits on self-hosting. Both can receive LiteLLM traces through their callbacks, so the decision mostly comes down to scope and licensing, and some teams run both. Confirm the choice against your evaluation workflow before you build the store.
Can Phoenix be offered as a hosted service to our own customers?
Not under the license as written. Phoenix is licensed under the Elastic License 2.0, which forbids providing the software to third parties as a hosted or managed service and forbids circumventing license key functionality. ELv2 is source-available, not an OSI-approved open source license. Internal use inside your own organization, including self-hosting in your own infrastructure, is the scenario the self-hosting docs describe as free with no feature limitations. If you plan to offer tracing to external parties, have your legal team review the license text in the Phoenix LICENSE file before you design the architecture.
Does a self-hosted MLflow or Phoenix server count as a managed service I need to confirm?
Self-hosting in your own infrastructure is the case the Phoenix docs describe as free, with traces, prompts and data staying in your environment, including air-gapped deployments. For MLflow, the self-hosting docs list managed services from Databricks, AWS SageMaker, Azure Machine Learning, Nebius and GCP. If you are considering a managed option instead of running the server yourself, confirm with the vendor what the managed service stores, where it runs, how access is controlled, what it costs and how data is exported. Phoenix also has a managed counterpart, Arize AX, which uses the same OpenTelemetry and OpenInference instrumentation but is a separate backend.
What is the difference between Phoenix and Arize AX for LiteLLM?
Phoenix is the open-source server you can run in your own infrastructure. Arize AX is Arize's managed platform. LiteLLM uses the arize_phoenix callback for Phoenix and the arize callback for Arize AX, and both can be enabled together. The README says the same OpenTelemetry and OpenInference instrumentation works with both. Confirm with Arize which features, retention terms, data residency and access controls apply to AX before you send prompt data there, since those details are not covered by the self-hosted Phoenix docs.
What does a MLflow or Phoenix tracing engagement cost, and what drives it?
The cost has four main parts: the time to configure LiteLLM callbacks and metadata, the time to deploy and secure the trace server, the storage and database backend, and the ongoing operation of upgrades and backups. Self-hosted Phoenix carries no license fee according to its docs, so most of the cost is labor and infrastructure. For MLflow, the self-hosting docs describe a SQLite default backend since MLflow 3.7.0 and recommend PostgreSQL for scaling, so a production server adds database and artifact storage cost. Costs rise with the number of trace fields you capture, the evaluation volume, retention length and the number of teams that need access. Ask any quote to state these items separately and to name what is one-time and what recurs.
How long does it take to get the first LiteLLM trace into MLflow or Phoenix?
The first trace depends on whether a trace server already exists. Once a server is reachable, enabling a callback in the LiteLLM configuration and sending one test request is a short step, and you can verify it in the trace UI. The longer work is the production path: deploying the server with a real database, restricting access with the authentication your organization uses, setting metadata conventions, and testing that prompt data is handled as your policy requires. No duration is set here because it depends on your platform and approvals, so ask for a written timeline tied to a defined scope.
What do we need from our own team before the work starts?
You need a named owner for the LiteLLM gateway, someone who can approve the trace store location and database, and a security reviewer who decides what prompt and response content may be stored. Your platform team should confirm the Kubernetes or VM target, the PostgreSQL or SQLite choice for each server, the object storage for MLflow artifacts if used, and the identity provider for access. Engineers who own applications should agree on which metadata fields to attach to requests so traces are useful. Without these decisions, the build stalls at the access and data handling steps.
Can our own engineers do this in-house, and what breaks most often?
Yes, if you have engineers comfortable with LiteLLM configuration, container deployment and database operations. The usual failure points are callback settings that send more data than policy allows, a trace server left on SQLite for production, missing authentication on the server endpoint, storage growth from full prompt bodies, and upgrades that are not tested against the callback version. Check each callback against the LiteLLM documentation for the version you run, and test one full path from request to trace to deletion before expanding it. DeployOpen can take on the design, build, hardening and handover of this path under a written scope if your team prefers a partner.
How DeployOpen scopes and delivers the tracing integration
DeployOpen plans, implements, hardens, documents and supports the MLflow or Phoenix tracing integration inside your own infrastructure, under a fixed scope agreed in writing before work starts. The scope fixes which trace backend is in play, which LiteLLM callbacks are enabled, where the trace store and its database run, who owns the service accounts and credentials, and what evidence is handed over at the end. Because most engagements are fixed-scope, the quote follows from that written scope, and the decisions above are settled in the planning phase rather than discovered during the build. Ask any partner to show the written scope before work begins, including which LiteLLM version is targeted, since the current LiteLLM release line is tracked on the project's releases page.
Delivery covers the parts that tend to be left unfinished when a team builds this alone: the callbacks entries in the LiteLLM configuration, the MLflow or Phoenix server and its backing PostgreSQL database, secret handling for any Arize AX credentials, network paths from the gateway to the trace store, and a short runbook for the people who will operate it. Confirm with the partner whether the deliverables include a tested restore of the trace store and a retest after LiteLLM or backend upgrades, because those are the points where tracing setups usually break. DeployOpen's role is to build and document the integration in your environment, not to certify it.
After handover, ongoing support can be added as a retainer covering upgrades of LiteLLM, MLflow or Phoenix, and periodic checks that traces still arrive with the expected metadata. Ask for the retainer terms in writing, including what is covered, how requests are raised and how quickly the partner responds, so the support model is as clear as the build scope. Your own team should keep ownership of the trace store's data retention and access decisions, since those depend on your policies and are not settled by the integration itself.

