Skip to content

opentelementry-instrumentation-google-genai: add gen_ai.tool.definitions to experimental semconv#4142

Merged
aabmass merged 23 commits intoopen-telemetry:mainfrom
wikaaaaa:tooldefinitions
Feb 4, 2026
Merged

opentelementry-instrumentation-google-genai: add gen_ai.tool.definitions to experimental semconv#4142
aabmass merged 23 commits intoopen-telemetry:mainfrom
wikaaaaa:tooldefinitions

Conversation

@wikaaaaa
Copy link
Copy Markdown
Contributor

Description

Change adds gen_ai.tool.definitions from otel v1.39 to gen_ai.client.inference.operation.details when experimental semconv is enabled. It's done similarly to how gen_ai.system_instructions are added.

Type of change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Does This PR Require a Core Repo Change?

No.

@wikaaaaa wikaaaaa requested a review from a team as a code owner January 26, 2026 15:09
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Jan 26, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: wikaaaaa / name: Wiktoria Walczak (2d86bd5)

Copy link
Copy Markdown
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! FYI this attribute will be more "typed" soon: open-telemetry/semantic-conventions#3378

Not blocking.

@aabmass aabmass merged commit b162ac1 into open-telemetry:main Feb 4, 2026
663 checks passed
wikaaaaa added a commit to wikaaaaa/opentelemetry-python-contrib that referenced this pull request Feb 5, 2026
wikaaaaa added a commit to wikaaaaa/opentelemetry-python-contrib that referenced this pull request Feb 5, 2026
wikaaaaa added a commit to wikaaaaa/opentelemetry-python-contrib that referenced this pull request Feb 5, 2026
aabmass pushed a commit that referenced this pull request Feb 5, 2026
sightseeker added a commit to sightseeker/opentelemetry-python-contrib that referenced this pull request Mar 11, 2026
…ons to experimental semconv (open-telemetry#4142)

* opentelementry-instrumentation-google-genai: add gen_ai.tool.definitions to experimental semconv

* Add _to_tool_definition

* Remove unused import

* Add GEN_AI_TOOL_DEFINITIONS to tests.

* Remove uneccesary space.

* address comments: add exclude_none to model_dump and tool type to error message

* address comment: add if/else statement on tool types and add tests for each tool

* dont serilize mcp client sessions in case of synchronous methods

* Refactor _to_tool_definition_common to be more clear

* remove uncessary 'function' key

* fix failing tests: make mcp import conditional

* Update changelog

* Update uv.lock

* address comment: remove undecessary typing.Type

* address comment: make mcp import conditional
sightseeker added a commit to sightseeker/opentelemetry-python-contrib that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants