Skip to content

Add gen_ai.system attribute to anthropic spans, enabling token/cost badges#1760

Merged
alexmojaki merged 3 commits intomainfrom
alex/anthropic-system
Mar 6, 2026
Merged

Add gen_ai.system attribute to anthropic spans, enabling token/cost badges#1760
alexmojaki merged 3 commits intomainfrom
alex/anthropic-system

Conversation

@alexmojaki
Copy link
Copy Markdown
Collaborator

@alexmojaki alexmojaki commented Mar 6, 2026

Summary by cubic

Adds the gen_ai.system attribute (value: "anthropic") to Anthropic spans and logs so token and cost badges render across all requests.

  • New Features
    • Added to /v1/messages (sync, async, streaming) and other endpoints (e.g., /v1/complete), including Anthropic Bedrock.
    • Propagated to streaming log events and JSON schema.
    • Updated tests to assert the field and simplify request/response and schema snapshots.

Written for commit 8dbf721. Summary will update on new commits.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 6, 2026

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8dbf721
Status: ✅  Deploy successful!
Preview URL: https://73745e1f.logfire-docs.pages.dev
Branch Preview URL: https://alex-anthropic-system.logfire-docs.pages.dev

View logs

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

devin-ai-integration[bot]

This comment was marked as resolved.

@alexmojaki alexmojaki enabled auto-merge (squash) March 6, 2026 17:16
@alexmojaki alexmojaki merged commit 0dcb5e5 into main Mar 6, 2026
16 checks passed
@alexmojaki alexmojaki deleted the alex/anthropic-system branch March 6, 2026 17:27
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.

1 participant