open-telemetry / open-telemetry/opentelemetry-python-contrib
No support for Async messages when using Anthropic instrumentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Describe your environment
OS: Mac OS
Python version: Python 3.14.0
Package version: @main
What happened?
There is no support for async messages when instrumenting Anthropic ChatAnthropic, so no spans are created.
Steps to Reproduce
Create a simple example like this one using FastAPI async : https://github.com/salaboy/observing-ai/tree/main/python/langchain/python-merch-store-otel-langchain-official
Expected Result
Async message should be instrumented as Sync messages
Actual Result
No instrumentation happens if Async is used.
Additional context
No response
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
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 the FastAPI async example linked in the issue and trace its use of Anthropic ChatAnthropic instrumentation. Compare the async message path with the existing synchronous path, then verify that async messages produce spans in the reproduction example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- backend, observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100