Skip to content

Small changes and cleanup to GenAi Utils package to enable google's GenAi instrumentation to use it#4556

Merged
aabmass merged 11 commits into
open-telemetry:mainfrom
DylanRussell:use_genai_utils
May 8, 2026
Merged

Small changes and cleanup to GenAi Utils package to enable google's GenAi instrumentation to use it#4556
aabmass merged 11 commits into
open-telemetry:mainfrom
DylanRussell:use_genai_utils

Conversation

@DylanRussell
Copy link
Copy Markdown
Contributor

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.

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • [x ] No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • [x ] Followed the style guidelines of this project
  • [ x] Changelogs have been updated
  • [ x] Unit tests have been added
  • [ x] Documentation has been updated

@DylanRussell DylanRussell requested a review from a team as a code owner May 8, 2026 14:38
@github-actions github-actions Bot added the gen-ai Related to generative AI label May 8, 2026
@DylanRussell
Copy link
Copy Markdown
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.

Comment thread util/opentelemetry-util-genai/pyproject.toml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aabmass aabmass enabled auto-merge (squash) May 8, 2026 19:00
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest May 8, 2026
@aabmass aabmass merged commit 7208140 into open-telemetry:main May 8, 2026
753 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gen-ai Related to generative AI

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants