Repository navigation
Troubleshooting
github-actions[bot] edited this page Oct 18, 2026
·
3 revisions
-
Check that spans are produced: run once with
OTEL_TRACES_EXPORTER=console. In stdio mode they print to stderr (on every platform). -
Check exports:
mcp_exporter.export.errors{signal}counts failures, and a warning is written to stderr at most every 30 s. WithOTEL_METRICS_EXPORTER=prometheusyou can see this counter even while OTLP is down. -
Endpoint form:
OTEL_EXPORTER_OTLP_ENDPOINTis a base URL (http://collector:4318), and the SDK appends/v1/traces. The per-signal…_TRACES_ENDPOINTvariables take the full URL. -
Protocol: the default is
http/protobufon:4318. For:4317, setOTEL_EXPORTER_OTLP_PROTOCOL=grpc. -
Auth: the header format differs per vendor (see Backends). Grafana Cloud needs base64 of
instanceID:token. -
Metrics later than traces: metrics export every 60 s by default (
OTEL_METRIC_EXPORT_INTERVAL).
-
Garbage on stdout: something in the server is writing non-JSON-RPC to stdout. The exporter forwards it unchanged
and counts it in
mcp_exporter.parse.errors. -
Old versions: on v0.3.0 and earlier, a request with
"_meta": nullcrashed the exporter. Upgrade to v0.3.1 or later. -
Server needs its own env vars: in a desktop client config, put them in the same
envblock as theOTEL_*variables. -
OTEL_*ignored when an SDK agent launches the exporter: both official SDKs' stdio clients start the server with only a small allowlist of variables (HOME,LOGNAME,PATH,SHELL,TERM,USERon Unix), unless you passenv. The exporter then falls back tolocalhost:4318and logsconnection refused. Pass the variables explicitly. In Python:StdioServerParameters(command="mcp-exporter", args=[...], env={**get_default_environment(), "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector:4318"}). In TypeScript:new StdioClientTransport({command, args, env: {...getDefaultEnvironment(), OTEL_EXPORTER_OTLP_ENDPOINT: "…"}}).
-
/readyzreturns 503: the upstream refuses TCP connections. Check-upstreamand the server's port. -
Responses aren't compressed any more: expected. The exporter asks the upstream for
identityencoding so it can observe responses. -
OAuth token rejected in client mode: the server enforces token audience. Use the
mcp-remoteform (Client Mode). - Sessions break with several replicas: you need session affinity, as without the exporter (Kubernetes).
- Every request is its own trace: the client sends no trace context. That's normal for uninstrumented agents.
-
-32601isn't counted as an error: by design on the server side (a caller mistake). See Telemetry Reference. -
_otherin the tool name: more than 500 distinct tool names. This cardinality guard protects your metrics backend. -
A task's duration is missing: it's recorded when a terminal status is observed. If the client never polls again, the
task is dropped after
-session-idlewithout an outcome.
- Does it support stdio and HTTP at the same time? Run one exporter per server; each is a single process.
-
Overhead? About 10 µs of CPU per request/response pair (
go test ./internal/observe -bench .). Streams aren't buffered. - Can it block or modify tool calls? No. It's observability only. Policy and gateways are out of scope.
This wiki is generated from docs/wiki/ in the repository. Edit it there with a pull request; changes made here are overwritten.
Use it
Reference
Operate