open-telemetry / open-telemetry/opentelemetry-python-genai
[anthropic] Add beta.messages.stream span
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 63
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 175
Description
[!NOTE]
This issue was generated with AI assistance and requires investigation and confirmation prior to being worked on.
Part of #542.
Add tracing for anthropic.resources.beta.messages.Messages.stream and AsyncMessages.stream.
- Maps to
gen_ai.inference.client(chat) - Affected files:
src/opentelemetry/instrumentation/genai/anthropic/__init__.py,patch.py, tests
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.
Research direction
Start with src/opentelemetry/instrumentation/genai/anthropic/init.py and patch.py, then inspect the existing tests for the Anthropic instrumentation. Trace both anthropic.resources.beta.messages.Messages.stream and AsyncMessages.stream, mapping them to gen_ai.inference.client (chat). Done means the spans and corresponding tests cover both methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100