🐛 Bug Report: Anthropic instrumentation fails to instrument beta async streams
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- observability
Research direction
Start in packages/opentelemetry-instrumentation-anthropic/opentelemetry/instrumentation/anthropic/init.py, especially is_stream_manager at lines 173-187 and the wrapping logic at lines 588-627. Compare the handling of AsyncMessageStreamManager with BetaAsyncMessageStreamManager, then verify that a client.beta.messages.stream call is instrumented as expected.
Written by the indexing model from the issue text.
Description
Which component is this bug for?
Anthropic Instrumentation
📜 Description
Here, the instrumentor doesn't wrap a call using client.beta.messages.stream, because is_stream_manager only checks for AsyncMessageStreamManager and not BetaAsyncMessageStreamManager
👟 Reproduction steps
- Use
client.messages.streamto create an Anthropic API request - See it isn't instrumented
👍 Expected behavior
It should be instrumented
👎 Actual Behavior with Screenshots
🤖 Python Version
No response
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.1k
- Avg merge
- 8d 14h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from traceloop/openllmetry
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
traceloop/openllmetry#4471 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
traceloop/openllmetry#4454 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
traceloop/openllmetry#4450 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
traceloop/openllmetry#4447 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
traceloop/openllmetry#4431 · 1 comment ·
All issues in traceloop/openllmetry
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100