Repository navigation
[opentelemetry-instrumentation-genai-openai-agents] Do not record gen_ai.provider.name on tool execution metrics - #710
Merged
lmolkova merged 2 commits intoSep 13, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Add a regression assertion verifying that gen_ai.provider.name is absent from tool metrics.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR removes gen_ai.provider.name from OpenAI Agents tool execution metrics.
Changes:
- Removes provider attribution from tool metrics.
- Updates the processor test and adds a changelog entry.
File summaries
| File | Summary |
|---|---|
instrumentation/opentelemetry-instrumentation-genai-openai-agents/tests/test_processor.py |
Updates tool invocation metric expectations; absence of the provider attribute is not asserted. |
instrumentation/opentelemetry-instrumentation-genai-openai-agents/src/opentelemetry/instrumentation/genai/openai_agents/processor.py |
Stops assigning the provider name to tool metrics. |
instrumentation/opentelemetry-instrumentation-genai-openai-agents/.changelog/710.fixed |
Documents the metric correction. |
Review details
Suppressed comments (1)
instrumentation/opentelemetry-instrumentation-genai-openai-agents/src/opentelemetry/instrumentation/genai/openai_agents/processor.py:117
- After removing the assignment,
GenAITracingProcessor._provideris never read. The instrumentor still computes the OpenAI provider and passes it only to populate this dead field, leaving misleading state and plumbing; remove the constructor parameter/field and update its call sites and tests.
invocation = self._handler.tool(
name=span_data.name,
tool_type="function",
)
self._invocations[span] = invocation
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request dashboard statusMerged · refreshed 2026-09-17 06:33 UTC Status above doesn't look right?
|
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.
Removes setting gen_ai.provider.name on ToolInvocation.metric_attributes.
Tool execution does not invoke a GenAI provider, so per note [3] on gen_ai.provider.name for gen_ai.client.operation.duration, it is only required when the operation involves a call to a GenAI provider.