Your LLM dashboard may count Anthropic costs twice

By Chris Krah. Plexito, my company, maintains spantruth, the tool this page recommends. Measured on November 6, 2026 · the report · source

I sent one Claude call to a local stub that returned 1,000 input tokens and 200 output tokens. At $3 and $15 per million tokens, that call costs $0.006. With OpenLLMetry or the OpenTelemetry GenAI instrumentation, the totals of self-hosted Phoenix and Opik came to $0.012 for it.

Your invoice from Anthropic does not change, and no call is sent twice. The wrong number is the one your observability tool shows, and no error tells you. That number is what budget alerts, cost per customer and model comparisons read.

A span is a record of one operation. Since version 1.14.0, released in October 2026, the Anthropic Python SDK writes its own span for each call by default, named anthropic.messages.create, with token counts on it. It does this when your app has registered a global OpenTelemetry tracer provider, directly or through a setup call such as Traceloop.init. If an instrumentation library also writes a span with token counts, two spans now report the same call, and a backend that adds them up shows it twice.

This is documented. Anthropic's SDK tracing docs say: "If another library also traces the SDK, turn off one of the two." Each piece behaves reasonably alone. The default just means that an app that adds a library and does not read that line gets the overlap.

Check your project

Search all spans, not only root spans, for anthropic.messages.create. If they appear next to the spans of your library, both with token counts, you have the duplicate.

A second check is to compare tokens in your tool with Anthropic's usage data, for the same traffic and a day that ended more than 24 hours ago, because the data can lag that long. It needs an Admin API key, which individual accounts do not have. A ratio near 2 is a reason to look, not proof: confirm it with one controlled call.

To check the versions in a Python project, run this in its directory. It needs no API key, and it does not run your code:

uvx spantruth@0.4.2 doctor

It reads your lock file, or your requirements if you have no lock file, and tests the libraries it recognizes against a local fake provider. It installs those versions in its own environments, so it needs network access. A clean result does not clear your dashboard: it knows nothing about your backend, it cannot see settings in your code, and it does not cover paths such as LangChain with Langfuse's handler, or JavaScript projects. It also follows ANTHROPIC_OPEN_TELEMETRY in the shell you run it from, so run it with that variable unset.

What to do

Let one span per call report usage. The switch is ANTHROPIC_OPEN_TELEMETRY=false, set before the client is created, or open_telemetry=False on the client. A client created earlier, or given its own open_telemetry option, ignores the variable. Check with a new call in a clean project, because this does not repair stored data.

What was measured

One sync, non-streaming call to the stub, anthropic 2.4.0, the SDK's tracing at its default, a global tracer provider, and self-hosted backends receiving OTLP directly. The table shows what each backend's project pages display, with the exact values from their tooltips. The expected result is 1,200 tokens and $0.006.

LibraryPhoenix 21.0.0Opik 2.2.143
OpenLLMetry 0.62.4Two traces, each 1,200 and $0.006. Metrics: 2,000 prompt and 400 completion tokensTwo traces, each 1,200 and $0.006. Total cost: $0.012
OpenTelemetry GenAI instrumentation 1.3b0One trace: 2,400, $0.012One trace: 2,400, $0.012
OpenInference 3.1.0One trace: 2,400, $0.012One trace: 1,200, $0.006. Two spans, and only the SDK's is priced
OpenInference 3.3.0One trace: 1,200, $0.006One trace, no tokens or cost in the tables
OpenLLMetry or GenAI instrumentation, with the switchOne trace: 1,200, $0.006One trace: 1,200, $0.006

The pages round to $0.01 and <$0.01, and the tooltips show the values above. For OpenLLMetry, Phoenix's Traces tab shows only the two rows. The Total Cost stat on its Spans tab shows $0.01, and the project API returns 0.012. With the GenAI and OpenInference 3.1.0 rows, that stat counts root spans only and shows <$0.01, while the traces table, the trace view and the project API show $0.012. I filed the token and cost mismatch as phoenix#17856. I took screenshots of OpenLLMetry with the switch, not of the GenAI row, which comes from the APIs, as does OpenInference 3.3.0 on Phoenix. On Phoenix, the GraphQL field tokenCountTotal says 1,200 for the GenAI and OpenInference 3.1.0 rows, while the traces table and the metrics show 2,400.

Changing the setup moves the details, not the result:

I did not measure a real API call, async calls, retries, a stream that fails or ends early, each library's quickstart, Anthropic's API tracing, other SDK languages, cloud clients such as Vertex or Bedrock, or any other backend. The backends' prices are their own, and they match Anthropic's list price for Sonnet 4.5, the model in the test. The raw responses, the screenshots and the steps to reproduce this are in the repository.

Who found it and who fixed it

This is one of ten

A double span is one way that LLM telemetry goes wrong with nothing failing. A span that never ends makes the call disappear. A stream that drops its connection can count as a success. A cached token can vanish from your input count. spantruth tests those paths for each library every night, and compares each value with what the provider sent. Here are the ten bug classes, and here is the report. The report grades each library alone, with the SDK's tracing off, so your library's row will not show this. The row "OpenTelemetry GenAI instrumentation, with the Anthropic SDK's own tracing left on" does.

If your numbers are doubled and your setup is not in the table, or if a finding is unfair to your library, open an issue with your versions.