Thanks for OpenLLMetry — the Bedrock instrumentation has been solid for our cross-region setups.
What happens
AWS added the global. cross-region inference profile prefix (currently Claude Sonnet 4 — AWS docs). _cross_region_check recognizes us / us-gov / eu / apac but not global, so global.anthropic.claude-sonnet-4-... falls to the else branch and resolves to model_vendor="global" with the model name keeping its anthropic. prefix.
packages/opentelemetry-instrumentation-bedrock/opentelemetry/instrumentation/bedrock/__init__.py:1009
Impact
span_utils dispatches on model_vendor with no else clause (set_model_message_span_attributes, set_model_choice_span_attributes, _set_finish_reasons_unconditionally), so prompt, completion, and finish-reason attributes are silently dropped, and gen_ai.request.model is polluted with the anthropic. prefix — only on global. Claude Sonnet 4 traces.
Fix
Add "global" to the prefix list in _cross_region_check (the established list introduced in #2785). Happy to open a PR with a regression test.
Thanks for OpenLLMetry — the Bedrock instrumentation has been solid for our cross-region setups.
What happens
AWS added the
global.cross-region inference profile prefix (currently Claude Sonnet 4 — AWS docs)._cross_region_checkrecognizesus/us-gov/eu/apacbut notglobal, soglobal.anthropic.claude-sonnet-4-...falls to theelsebranch and resolves tomodel_vendor="global"with the model name keeping itsanthropic.prefix.packages/opentelemetry-instrumentation-bedrock/opentelemetry/instrumentation/bedrock/__init__.py:1009Impact
span_utilsdispatches onmodel_vendorwith noelseclause (set_model_message_span_attributes,set_model_choice_span_attributes,_set_finish_reasons_unconditionally), so prompt, completion, and finish-reason attributes are silently dropped, andgen_ai.request.modelis polluted with theanthropic.prefix — only onglobal.Claude Sonnet 4 traces.Fix
Add
"global"to the prefix list in_cross_region_check(the established list introduced in #2785). Happy to open a PR with a regression test.