Skip to content

feat: detect AnthropicVertex provider as gcp.vertex_ai#14

Merged
t-santoshsahu merged 1 commit into
harness:mainfrom
shreyas70:CCM-anthropic-vertex-instrumentation
Jul 17, 2026
Merged

feat: detect AnthropicVertex provider as gcp.vertex_ai#14
t-santoshsahu merged 1 commit into
harness:mainfrom
shreyas70:CCM-anthropic-vertex-instrumentation

Conversation

@shreyas70

Copy link
Copy Markdown
Contributor

Summary

  • Detect AnthropicVertex / AsyncAnthropicVertex clients in Anthropic instrumentation and set gen_ai.provider.name to gcp.vertex_ai instead of anthropic
  • Populate gcp.project and gcp.location span attributes from the Vertex client when available
  • Add unit tests for provider resolution, GCP attribute enrichment, and end-to-end AnthropicVertex span coverage (including LangChain ChatAnthropicVertex path)

Test plan

  • pytest test/instrumentation/anthropic/test_anthropic.py -k "vertex or resolve_provider or apply_vertex"
  • Full test/instrumentation/anthropic/ suite passes in CI

Made with Cursor

Resolve gen_ai.provider.name from Messages._client type so Claude-on-Vertex
calls (including LangChain ChatAnthropicVertex) attribute to gcp.vertex_ai
with gcp.project and gcp.location when available.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@t-santoshsahu
t-santoshsahu merged commit 1d741c1 into harness:main Jul 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants