Traces
Traces Troubleshooting
Debug missing spans, missing attributes, and shutdown behavior.
Use this checklist when traces do not appear in the Inference platform or when spans are missing expected attributes.
No Spans Appear
Confirm Export Configuration
echo "$INFERENCE_OTLP_ENDPOINT"
echo "$INFERENCE_API_KEY"
echo "$INFERENCE_SERVICE_NAME"Enable Debug Logging
export INFERENCE_DEBUG=trueInitialize Before Clients
Call setup() before constructing provider or framework clients. Many
integrations patch shared prototypes or callback configuration paths.
const tracing = await setup({ modules: { openai: OpenAI } });
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });Spans Disappear In Short-Lived Processes
Batch exporters flush on an interval. CLIs, scripts, workers, and tests should
call shutdown() before the process exits.
await tracing.shutdown();415 Unsupported Media Type
The ingest endpoints accept OTLP/JSON only (Content-Type: application/json). The SDKs' built-in exporters send JSON by default, but a
custom exporter (for example an OpenTelemetry Collector) defaults to
OTLP/protobuf, which the ingest endpoint rejects with 415 Unsupported Media Type. Force JSON encoding on your exporter, such as encoding: json on an
otlphttp collector exporter. Do the same for the
Langfuse OTEL routes, which also accept JSON
only.
Framework Spans Are Missing
| Integration | Check |
|---|---|
| LangChain / LangGraph JS | Pass @langchain/core/callbacks/manager as a namespace to setup() |
| LangSmith | Set LANGSMITH_TRACING=true and use otel or hybrid mode |
| Claude Agent SDK TS | Use wrapClaudeAgentSdkQuery(query) |
| OpenAI Agents | Pair openaiAgents with openai in setup() |
| Vercel Eve | Export defineCatalystEveInstrumentation() from agent/instrumentation.ts |
Attributes Are Missing
Some attributes only appear when the upstream provider returns the data. For example, token counts depend on provider usage fields, and Anthropic prompt-cache details appear only when prompt caching actually engages for the request.
Next Steps
If setup order, export configuration, and shutdown are correct, reduce the issue to the smallest provider call and compare it with Traces Quickstart.