LiteLLM logs in Splunk Observability Cloud

LiteLLM can send traces to Splunk Observability Cloud through its built-in OpenTelemetry callback, using an ingest token and your realm. This page explains the setup, checks and failure points.

On this page

How LiteLLM sends traces to Splunk Observability Cloud

A platform team running a self-hosted LiteLLM gateway that wants request traces in Splunk Observability Cloud can use LiteLLM's built-in otel callback. It reads the standard OpenTelemetry OTLP environment variables, and LiteLLM preserves Splunk's /v2/trace/otlp ingest path, so no separate exporter or collector is required for this path. The callback needs two inputs from your Splunk organization: an ingest access token, sent in the X-SF-Token header, and your realm, which determines the regional endpoint your traces are sent to. Confirm both values in your own Splunk Observability Cloud settings before you change the gateway configuration, and store the token in your secret manager rather than in plain configuration files.

The scope of this path is traces only. The supplied documentation for the Splunk integration describes trace delivery, so treat traces as the confirmed part of this design. Whether LiteLLM's metrics or request logs can also reach Splunk, and through which mechanism, is a separate decision that you should verify against the current LiteLLM Splunk Observability Cloud docs and your Splunk team's guidance before you plan a dashboard or alert around them. Pin the LiteLLM release you test against, since the callback's behavior is tied to the version running in your gateway, and retest after each upgrade.

Before you enable the callback in a shared environment, run a test request through a non-production key and confirm that a trace appears in Splunk with the expected service name and span attributes. Check that the token has only the ingest permission it needs, that the realm matches the organization's Splunk instance, and that the gateway can reach the Splunk endpoint through your egress rules. If traces are missing, check the gateway logs for export errors first, then the token and realm, since those account for most failed first deployments.

What you need before enabling the Splunk callback

The Splunk callback depends on four things lining up: a LiteLLM proxy on a supported release, a Splunk Observability Cloud organization that can issue an ingest token, the correct realm, and a network path from the gateway to Splunk. Check each one before changing the gateway configuration, because a missing piece usually shows up as silent dropped traces rather than a clear error.

A supported LiteLLM release

Run a proxy version from the line LiteLLM currently supports. The releases page lists v1.105.1, published October 14, 2026, as the latest release, and LiteLLM maintains support for the four most recent stable minor versions. Record the exact version of every proxy pod, since a mixed fleet can produce inconsistent trace attributes. Confirm the callback behavior against the version you run, because the configuration keys can change between releases.

LiteLLM releases

Splunk Observability Cloud access

You need an organization in Splunk Observability Cloud and an ingest access token that the gateway will send as the X-SF-Token header. Confirm with your Splunk administrator which token type your organization issues today, which permissions it carries, and whether it is scoped to ingest only. Do not reuse a broader administrative token for the gateway, and record who owns the token and when it expires.

The correct realm

The realm identifies the Splunk Observability Cloud region that hosts your organization, and it determines the ingest hostname the callback sends traces to. Find the realm in your Splunk Observability Cloud account before writing any configuration, and do not guess it from the browser address alone. A realm mismatch typically results in rejected or missing data, so verify the first traces arrive in the expected organization.

Outbound HTTPS from the gateway

Each proxy pod must reach the Splunk ingest endpoint on the /v2/trace/otlp path over HTTPS. Check egress rules in the Kubernetes network policy, the cloud security group, any corporate proxy, and the DNS resolver used by the pods. In restricted or air-gapped networks, confirm that Splunk is reachable through an approved egress path before you enable the callback, because the gateway will not fail requests when traces cannot be delivered.

Token storage in a secret manager

Store the ingest token in your secret manager and inject it into the proxy at runtime, the same way you handle LITELLM_MASTER_KEY. Avoid writing the token into a ConfigMap, a values file in Git, or container image layers. Plan rotation: when you rotate the token in Splunk, you need a documented step that updates the secret and restarts the pods without dropping traffic.

A test trace before production

Enable the callback first on a non-production gateway with a test virtual key, send a few requests, and confirm the traces appear in the Splunk Observability Cloud interface for the expected organization. Record which attributes arrive and which are missing, so you know what to expect in production. This check also tests the token, realm and egress path together, which is the fastest way to find a configuration mistake.

Configuring the otel callback step by step

This sequence connects a self-hosted LiteLLM proxy to Splunk Observability Cloud so that traces from a test request through a virtual key appear in Splunk APM. Each step ends with a check you can run before moving on.

  1. Create or confirm an ingest token

    Someone with administrator access in Splunk Observability Cloud creates an ingest access token for the LiteLLM traces, or confirms an existing one that is scoped for ingest. LiteLLM sends this value in the X-SF-Token header, so the token must be an ingest token and not a personal API or user token. Store it in your secret manager at this point, not in a note or ticket. Done when the token is listed as active in the Splunk Observability Cloud access token settings and the owning team can name where it is stored.

  2. Identify the Splunk realm

    Find the realm for your Splunk Observability Cloud organization, shown in your Splunk Observability Cloud account or org settings. The realm determines the ingest hostname that LiteLLM must reach, so a mismatch shows up as failed exports rather than an error in the proxy. Confirm the realm with your Splunk administrator and record it next to the token reference. Done when you can state the realm and confirm from the proxy host that outbound HTTPS to the ingest endpoint for that realm is allowed by your firewall or egress proxy.

  3. Set the standard OTLP environment variables

    On the proxy host or in your Kubernetes deployment, set the standard OpenTelemetry OTLP environment variables that the LiteLLM Splunk page lists, including the endpoint path that keeps Splunk's /v2/trace/otlp ingest path. Copy the variable names and values exactly from the LiteLLM Splunk Observability Cloud documentation rather than from memory or a blog post, because small differences in names cause silent drops. Keep the token value out of this file: reference it from the secret store at runtime. Done when the variables appear in the running container's environment and contain no literal token.

  4. Enable the otel callback in the proxy configuration

    In the LiteLLM proxy configuration file, add the otel callback as the Splunk Observability Cloud page describes. Keep the configuration in version control and confirm that the file contains only the callback reference and no secrets. If your deployment uses the admin UI or another config source, apply the same callback there and make sure only one source defines it. Done when the proxy configuration validates on a staging instance and the callback name matches the one in the LiteLLM documentation.

  5. Keep the token in a secret manager

    Move the ingest token into the secret store your platform uses, such as a Kubernetes secret backed by your secret manager, and inject it as an environment variable into the proxy pods or service. Restrict read access to the service account running the proxy and the people who deploy it. Confirm that the token does not appear in the rendered configuration, logs, container image layers or the admin UI. Done when a search of the config repository and a sample of proxy startup logs finds no token value.

  6. Restart or roll the proxy

    Restart the proxy process or roll the Kubernetes deployment so the new environment variables and callback take effect. LiteLLM reads these settings at startup, so changes made to a running process are not applied. Watch the startup logs for an error about the callback or the exporter, and check the health endpoint once the pods are ready. Done when the proxy reports healthy on every replica and the startup logs show no exporter configuration errors.

  7. Send a test request through a virtual key

    Create a test virtual key with access only to a low-risk model, then send one request through the proxy with that key and a request ID or metadata tag you can search for later. Using a virtual key matters because it ties the trace to a key, team and budget the same way production traffic will be tied. Keep the test prompt free of personal data. Done when the request returns a normal response and you have recorded the request ID returned or logged by the gateway.

  8. Confirm the trace in Splunk APM

    Open Splunk APM in Splunk Observability Cloud and search for the request ID or metadata tag from the test request. Confirm the trace shows the LiteLLM span with the model, latency and status you expect. If the trace is missing, check the realm, the token scope and the exporter logs before changing anything else, and allow for ingest delay before concluding that data is lost. Done when the test trace is visible in Splunk APM and you can match its request ID to the gateway log entry. Confirm with your Splunk administrator where the data lands and which index or dashboard your teams should use.

How a request becomes a Splunk trace

The trace starts when a client application calls the LiteLLM proxy, which runs the built-in OpenTelemetry callback after the request is handled. The callback exports the trace over OTLP to the /v2/trace/otlp path on Splunk Observability Cloud, sending the ingest access token as X-SF-Token for the configured realm. The token and realm mark the trust boundary between your network and Splunk's SaaS endpoint, so check that the token is scoped for ingest and stored in a secret manager, and confirm the realm matches your Splunk organization before you expect data to appear.

Request flow from the client application through the LiteLLM OpenTelemetry callback to Splunk.

Where LiteLLM trace data appears in Splunk

The first thing to confirm is that LiteLLM traces arrive in Splunk Observability Cloud through the OTLP path, /v2/trace/otlp, and are then viewed with the Splunk trace tooling rather than in a separate LiteLLM screen. Once the callback is configured with the ingest access token sent as X-SF-Token and the correct realm, the trace data should be visible in the trace views of the Splunk Observability Cloud realm you named. The supplied documentation covers the transport and the authentication, but it does not give a fixed service name, span names or attribute keys that you can rely on for every deployment. Do not build dashboards, detectors or saved searches on assumed names. Send a few test requests from a non-production key, open the resulting traces, and record the exact service name, span names and attribute keys that appear in your realm. Write those down as the reference for your team, and repeat the check after every LiteLLM upgrade, because the telemetry emitted by the callback can change between releases.

Prompt and response content in traces is a privacy decision, not a default you can assume away. Whether message bodies, model outputs or other request content reach Splunk depends on how your LiteLLM gateway is configured for logging, including whether prompt storage is enabled and what metadata the callback attaches to each span. Before you enable the callback in production, decide which categories of data may leave the gateway for an external observability service, and confirm with your compliance and privacy owners which of those categories apply to your users. Then test what actually lands in Splunk by inspecting a span from a request containing a clearly marked dummy value. If content you did not intend to export appears, stop and change the logging settings or add masking before the callback runs. Treat the Splunk ingest token as a secret, store it in your secret manager, and limit who in Splunk can view trace data that may contain prompts.

Mapping LiteLLM fields to Splunk trace data

This table maps each Splunk setup input to where it lands in the LiteLLM configuration and the trace data. Read it as a checklist: confirm each destination in your test environment before pointing production traffic at the endpoint, and treat any attribute marked for verification as unconfirmed until you see it in Splunk.

FieldWhere it goesWhat to confirm
Ingest access tokenSent as the X-SF-Token header on OTLP trace requestsUse an ingest token, not an API token. Confirm it is stored in a secret manager and not in the config file.
RealmSets the Splunk Observability Cloud endpoint host for the trace exporterConfirm the realm for your organization in Splunk Observability Cloud and match it exactly in the endpoint host.
OTLP endpoint pathPreserved as /v2/trace/otlp when LiteLLM exports traces through the built-in OpenTelemetry callbackVerify the full endpoint URL in the test environment with a single request before enabling the callback at scale.
OpenTelemetry environment variablesStandard OTLP settings read by the LiteLLM process to set the exporter endpoint and headersConfirm variable names against the current LiteLLM Splunk documentation for your release, since they can change between versions.
Virtual key or team metadataAttached to traces as request metadata so spans can be filtered by key, team or userVerify which metadata keys appear as span attributes in Splunk. Do not assume the key ID itself is exported.
Request IDCarried on the trace so a gateway request can be matched to its LiteLLM spend log and caller logsVerify in the test environment that the same ID appears in the trace and the local log before relying on it for correlation.
Model and provider nameRecorded on the LLM call span for filtering by model and routeVerify attribute names in Splunk. Confirm that model names from your routing config appear as expected.

Protecting the ingest token and prompt data in traces

The Splunk trace pipeline carries a write credential and whatever metadata LiteLLM attaches to each request, so both need controls before go-live. The cards below cover the token, the gateway's own keys, network paths, trace content and rotation, and they connect to the decision on whether prompts are stored at all.

Store the ingest token in a secret manager

The Splunk ingest access token is sent as the X-SF-Token header, so anyone who reads the gateway's environment or config can write data into your Splunk org. Keep it out of config.yaml and out of container images, and inject it at runtime from the secret manager your platform already uses. Check that the proxy's logs and the admin UI never echo the value.

Splunk docs

Protect the LITELLM_MASTER_KEY

The master key controls the proxy's admin functions, including creating virtual keys and changing budgets, so it is a higher-value secret than the Splunk token. It must start with sk-, and LiteLLM recommends keeping it in a secret manager. Confirm that the key is separate from the Splunk token and that each has its own rotation owner.

Production guide

Scope the ingest token where Splunk allows

Ask your Splunk administrator whether the ingest token can be limited to the ingest path and to a dedicated token name used only for LiteLLM. A token that can also read data or manage the org gives an attacker more than the gateway needs. Record who created the token and which realm it targets so it can be traced during an incident.

Restrict egress to the Splunk endpoint

The gateway should reach only the Splunk ingest endpoint for the realm you use, plus its model providers and databases. Use egress policies, a proxy with an allowlist, or Kubernetes network policies to block other outbound destinations. Test the rule by confirming that traces arrive and that a request to an unlisted host fails.

Review what metadata reaches traces

Traces carry request metadata, so check which fields LiteLLM attaches before they leave the gateway. Usernames, email addresses, team names, and free-text metadata sent by callers can end up in Splunk even when prompt bodies are excluded. Decide on an allowlist of attributes and document it for the team that owns Splunk access.

Connect trace content to the prompt storage decision

Whether prompt and response bodies may appear in traces should follow the same decision as the gateway's request logs. If your policy keeps bodies out of spend logs, keep them out of Splunk too, and confirm this in a test trace. Record the decision so that the trace configuration and the logging policy stay aligned when either changes.

Rotate the token on a schedule

Plan rotation for the ingest token and the master key, and test the procedure in a non-production environment first. Rotation of the Splunk token means updating the secret, restarting or reloading the gateway, and confirming new traces arrive while the old token is revoked. Keep a dated record of each rotation for audit reviews.

Verifying traces end to end before production

Before production traffic goes through the Splunk exporter, run a known test set and reconcile it against the gateway's own records. Send a fixed batch of requests through at least two virtual keys and two models, including one key restricted to a single model, so you can tell which key and model each trace carries. Count the requests you sent, count the traces that arrive in Splunk Observability Cloud for the same window, and investigate any gap before moving on. A trace count that does not match the gateway request count usually points to sampling, a wrong realm, a token scoped to the wrong organization, or traces dropped by the collector path. Confirm the trace count with the realm and ingest token you intend to use in production, not a personal test token, because a mismatch there is the most common cause of a silent failure.

Next, check the content of the traces against the gateway's own logs. Pick several requests and compare the latency and token fields on each Splunk trace with the matching entry in LiteLLM's request logs, looking for the same request identifier, model name and key alias. Latency values should agree within the tolerance you set for clock and network skew. Then send requests that you know will fail, such as an invalid model name or a key that has exceeded its budget, and confirm that these failed calls appear as error traces with the expected status and error text. Failed calls are the ones security and operations teams most need to see, so do not accept a test plan that only covers successful responses.

Finally, test token rotation as part of the same run. Rotate the ingest access token used as X-SF-Token in the staging configuration, redeploy, and confirm that traces resume under the new token while the old token stops being accepted. Record who owns the rotation, where the token is stored, and how a failed export is detected. Load testing belongs in the separate scaling step, so keep this run small and deliberate. Confirm the exact ingest token scopes and any Splunk-side retention or access settings with your Splunk administrator, since those are set in your Splunk environment and not in LiteLLM.

Why LiteLLM traces are missing in Splunk

This table lists the failures that most often stop LiteLLM traces from reaching Splunk Observability Cloud, with the cause and a check the reader can run for each. Work through the rows in order, since the realm and token checks come before header and egress checks. The main takeaway is that most missing-trace cases come down to a wrong realm, a token problem, or a callback that was never loaded.

Symptom or failureLikely causeCheck or fix
No traces appear at allCallback not loaded after restart or config changeConfirm the proxy log shows the otel callback initializing at startup, then restart the proxy after any config edit and send one test request.
Requests fail or traces are rejected with an auth errorIngest token is invalid, expired, or is an API token rather than an ingest tokenCreate or confirm an ingest access token in Splunk Observability Cloud and check that its type matches ingest, not API or session use.
Traces go to the wrong place or none arriveRealm in the endpoint does not match the realm of your Splunk Observability Cloud organizationCompare the realm shown in your Splunk Observability Cloud profile with the realm in the OTLP endpoint, and correct the mismatch before testing again.
Endpoint returns not found or wrong pathIngest path altered or truncated, so /v2/trace/otlp is missingConfirm the full endpoint ends with /v2/trace/otlp, and check that no proxy rewrite or base-URL setting strips the path.
Authentication fails even with a valid tokenToken not sent in the X-SF-Token headerInspect the exporter headers in the environment or config and confirm X-SF-Token carries the ingest token, using a test call from the proxy host.
Token rejected only from the LiteLLM hostToken pasted with leading or trailing whitespace or a line breakCheck the secret value length and strip whitespace when storing it in your secret manager or environment file.
Exporter times out or connection is refusedBlocked egress, missing proxy settings, or a TLS-inspecting firewallTest HTTPS reachability to the realm ingest host from the proxy pod or VM, and set the proxy variables your network requires.
Traces arrive but cannot be foundService name differs from the one you search for, or sampling drops most requestsConfirm the service name configured for the exporter, search by that name, and check the sampling setting before concluding traces are lost.

Questions teams ask before connecting LiteLLM to Splunk

What does it cost to connect LiteLLM to Splunk Observability Cloud?

The software side is open source, but the total cost comes from three places: your Splunk Observability Cloud subscription and ingest volume, the engineering time to configure and verify the callback, and any ongoing operating effort. LiteLLM's otel callback itself carries no license fee in the MIT-licensed core, though the enterprise directory is under a separate license. Costs rise with the number of environments, the volume of traces you send, and whether prompt content is attached to spans. Ask any partner for a quote that separates one-time setup from recurring work such as upgrades and retesting, and confirm your Splunk ingest pricing with your Splunk account team.

How long does setup take if we do not have Splunk admin access?

Setup time depends mostly on whether the person configuring LiteLLM can get an ingest access token and confirm the realm without waiting on others. If your Splunk administrators can issue a token and tell you the realm quickly, the LiteLLM side is a configuration exercise. If access requires a request cycle through a separate team, most of the elapsed time will be waiting, not engineering. Ask your Splunk team early for an ingest token scoped for this purpose and the correct realm before scheduling the work.

Can our team connect LiteLLM to Splunk alone using the LiteLLM docs?

A team with Kubernetes or container experience and access to both the LiteLLM proxy configuration and a Splunk ingest token can usually follow the LiteLLM Splunk Observability Cloud documentation without outside help. The harder parts are usually not in the callback. They are network egress to the Splunk ingest endpoint, safe storage of the token in your secret manager, and checking that traces appear with the attributes your team needs. Teams without an observability owner, or with strict change control, often find an external review useful before production.

What do we need to provide before the work starts?

Plan to provide five things: Splunk administrator access or a named contact who can issue an ingest access token, the correct Splunk realm for your organization, a network path from the LiteLLM proxy to the Splunk ingest endpoint, a test environment where traces can be sent without touching production users, and a named owner for the LiteLLM configuration. Ask for the token to be stored in your secret manager rather than in a plain configuration file. Confirm each item in writing so that the scope and timing are clear.

Does the Splunk connection cover logs and metrics, or only traces?

The Splunk Observability Cloud integration described in the LiteLLM documentation sends traces through the otel callback and the OTLP ingest path. It does not, by itself, establish a full logging or metrics pipeline for every LiteLLM event. If you need request logs in Splunk Log Observer, Prometheus-style metrics, or security event records, treat each as a separate scope item with its own design, storage and retention decisions. Confirm exactly which signals your chosen configuration sends before you promise dashboards or alerts to stakeholders.

What changes after a LiteLLM upgrade, and does the Splunk setup survive it?

Upgrades can change callback behavior, configuration keys and the attributes attached to spans, so the Splunk connection should be retested after each release you adopt. LiteLLM maintains support for the four most recent stable minor versions, so plan upgrades within that window and check the release notes for the version you move to, including the latest release listed on the LiteLLM releases page. Keep the Splunk configuration in version control so that a rollback is quick, and include a trace check in your upgrade runbook.

Will prompt content end up in Splunk, and who decides?

Your team decides what the callback sends, and that decision belongs in the design before the first trace is emitted. Traces can carry request metadata, and depending on configuration they can carry more detail than you intend. Review which fields are attached, whether any personal data could appear in span attributes, and who in Splunk can view them. Involve your privacy and security owners early, because changing the data set after traces have been stored means working through retention and deletion in Splunk.

How DeployOpen works on this

DeployOpen plans and implements self-hosted LiteLLM inside your own infrastructure, including the trace export to Splunk Observability Cloud. We start from the endpoint, token and realm your Splunk team controls, then agree the scope, build the callback configuration, verify traces and hand over a runbook your team can operate.

How we scope

  • Written scope names the LiteLLM proxy version, the Splunk realm and the ingest token handling method agreed with your team.
  • We confirm which request metadata fields become span attributes and which content stays out of traces.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Quotes follow from the written scope, and we ask you to confirm the Splunk account and access you will provide.

How we build

  • We configure the built-in OpenTelemetry callback with standard OTLP environment variables in your deployment.
  • We store the ingest access token in your secret manager and keep it out of configuration files and logs.
  • We confirm the realm and the /v2/trace/otlp ingest path against your Splunk Observability Cloud organization.
  • We test with sample requests, check that traces appear in Splunk, and document what each trace field means.

How we hand over

  • You receive configuration as code, the environment variable inventory and a record of the token rotation procedure.
  • Documentation covers where LiteLLM data lands in Splunk, how to find a request by trace, and known gaps.
  • We walk your platform and security teams through the setup and the verification checks so they can repeat them.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Upgrades of LiteLLM are planned against the supported release lines so the callback keeps working across versions.
  • We help you confirm changes in Splunk ingest or token scope before they affect production traces.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.