Small changes and cleanup to GenAi Utils package to enable google's GenAi instrumentation to use it#4556
Merged
Merged
Conversation
Contributor
Author
|
Is there any reason not to bump up the versions of all the packages in the instrumentations (and therefore also bump up all the requirements.oldest files ?) I don't see a reason not to do that. |
aabmass
approved these changes
May 8, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates opentelemetry-util-genai to better support upcoming Google GenAI instrumentation usage by aligning dependencies, refining invocation APIs/attributes, and adjusting tests/docs accordingly.
Changes:
- Update test log exporter usage to the newer in-memory log record exporter API.
- Extend inference invocation wiring (operation name support) and add/adjust recorded GenAI attributes.
- Bump OpenTelemetry dependency versions and update package docs/changelog.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| util/opentelemetry-util-genai/tests/test_utils.py | Update in-memory log exporter class used by tests. |
| util/opentelemetry-util-genai/tests/test_utils_events.py | Update in-memory log exporter class used by event tests. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/handler.py | Add operation_name parameter forwarding for inference factory. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_tool_invocation.py | Add tool-call arguments attribute on tool spans. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_invocation.py | Adjust content-capture behavior for tool definitions. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_inference_invocation.py | Update usage attribute constants and add reasoning token attribute. |
| util/opentelemetry-util-genai/README.rst | Minor wording update to reference InferenceInvocation. |
| util/opentelemetry-util-genai/pyproject.toml | Bump OpenTelemetry dependency versions. |
| util/opentelemetry-util-genai/CHANGELOG.md | Add changelog entry for these prep/cleanup changes. |
lmolkova
approved these changes
May 8, 2026
lzchen
approved these changes
May 8, 2026
…ry-python-contrib into use_genai_utils
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Small changes and cleanup to GenAi Utils package to enable google's GenAi instrumentation to use it
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.