Skip to content

Conversation

@fenilfaldu
Copy link
Contributor

@fenilfaldu fenilfaldu commented May 16, 2025

📥 Pull Request

Closes #977

📘 Description
The key changes are:

  • Added support for the Stream type from Anthropic

This means the instrumentation now properly handles both:

  • Synchronous responses (regular API calls)
  • Streaming responses (when using the stream=True)

🧪 Testing
Tested all the Anthropic notebook examples

@fenilfaldu fenilfaldu requested review from Dwij1704 and dot-agi May 16, 2025 20:00
@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ps/instrumentation/anthropic/attributes/message.py 83.33% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fenilfaldu fenilfaldu force-pushed the anthropic-fix-stream branch from 2cc45ff to da258b3 Compare May 19, 2025 15:02
Copy link
Member

@Dwij1704 Dwij1704 left a comment

Choose a reason for hiding this comment

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

LGTM! Great work @fenilfaldu

Copy link
Member

@dot-agi dot-agi left a comment

Choose a reason for hiding this comment

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

Good job @fenilfaldu !

@dot-agi dot-agi merged commit 8dda585 into main May 21, 2025
10 checks passed
@dot-agi dot-agi deleted the anthropic-fix-stream branch May 21, 2025 13:18
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.

[Bug]: Anthropic messages not being instrumented correctly

4 participants