open-telemetry / open-telemetry/opentelemetry-python-genai
Coverage gaps in `opentelemetry-instrumentation-google-genai` instrumentations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 63
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 175
Description
Using this to track some gaps as I go about monkey patching various APIs as part of the openinference donation stuff..
Gaps:
A generic way for the user to provide attributes that make it into the span.. We use a ContextVar to do this for the GenerateContent method, and could do the same for the other APIs..
Embeddings:
- We could allow capturing various
EmbedContentConfigin attributes the same way we doGenerateContentConfigin thegenerate_contentinstrumentation. - Openinference captures the actual raw embeddings in their instrumentation -- that seems too big to put into an attribute..
- https://github.com/googleapis/python-genai/issues/2658 --
EmbedContentResponsehas a bug that doesn't let us get tokens fromusage_metadata
Interactions:
- Need to capture interaction ID: https://github.com/open-telemetry/semantic-conventions-genai/pull/372
- Expand input / output messages to capture all inputs / outputs -- the SDK accepts so many different types (related sem conv issue: https://github.com/open-telemetry/semantic-conventions-genai/issues/380)
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
The issue does not name repository files or tests. Start by locating the existing GenerateContent instrumentation and compare its ContextVar and config-attribute handling with the Embeddings and Interactions APIs. Review the linked semantic-conventions and SDK issues first; done requires agreeing on a focused scope and tests for the selected gaps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100