Hey — we're seeing missing token telemetry on Bedr...
# questions
c
Hey — we're seeing missing token telemetry on Bedrock LLM spans in Laminar. What we see : • `litellm.completion`spans for`prod/claude-sonnet-4-5-bedrock`show`total_token_count = 0`on ~42% of calls • Same model, same window — some traces populate correctly, others zero Concrete example: • Trace`f22cd908-add0-7290-6a38-e425eab26315`— 52 completion spans, every single one has`gen_ai.usage.input_tokens = 0` • Trace`c66c0b1c-ca9a-7881-041c-dcadc8911362`— same model — correctly shows`input_tokens = 33,686`,
output_tokens = 10,349
The OpenHands API
accumulated_token_usage
has the real counts (3.3M prompt tokens for one of these conversations), so the tokens are being tracked — just not forwarded to OTel spans by the LiteLLM proxy on Bedrock streaming calls. Ask: Can the LiteLLM proxy be configured to forward Bedrock usage to
gen_ai.usage.*
span attributes? Or is there an admin-scoped endpoint to query
accumulated_token_usage
across all user accounts?
m
Hey @clever-window-69122 do you have these traces in Laminar? Do you know if there is any difference between those traces? It would be really useful if we could look into these traces
One of my guesses is that the ones with 0 tokens was streaming. There was a recent fix by @limited-student-10747 that repaired this. You can try and get this by making sure you have latest
lmnr
. Depending on how you have openhands installed, you may get it by
uv add -U lmnr
or similar. If not, happy to work with OpenHands team to bump it. Though I am not 100% certain that this is the root cause
c
Thanks, that’s helpful! Do you know which versions of Laminar (
lmnr
) and OpenHands include this fix? We can check those against the versions we’re currently running.
m
It's 0.7.60, fixed and released last weekend
c
ohh i see and this is for the self hosted version we use as well?
m
yeah, that's the tricky bit. I am not 100% sure how the self-hosted version is built and whether you can change dependencies inside it. But most likely you cannot, so we should probably ask OpenHands team to bump Laminar and you'll get the fix in your next release. I'll do that
I've asked the team to bump it, I think you should expect this to be released in the next version some time next week
c
okay that would be great, because this is a big bottleneck for our ability to work with laminar! Also is there any way for us to be able to control the versioning of Lmainar within the self hosted version!