Remove provider name from local agent span#132
Open
lmolkova wants to merge 7 commits into
Open
Conversation
43f8d16 to
d7e3056
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GenAI agent invocation telemetry to match the referenced semantic conventions change (semconv-genai PR #289) by removing gen_ai.provider.name from invoke_agent spans/metrics (notably for local/internal agent spans), and updating the repo’s semconv pin and validation rules accordingly.
Changes:
- Bump the pinned
semantic-conventions-genairef to a newer commit. - Update
opentelemetry-util-genaiagent invocation APIs/attributes/tests to stop settinggen_ai.provider.nameforinvoke_agent. - Adjust span validation policy to treat
invoke_agentexpectations as span-kind-dependent (internal vs client), and update LangChain instrumentation/tests to match the new handler signature.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| versions.env | Updates the pinned semconv-genai commit SHA. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/handler.py | Removes provider from agent invocation factory APIs. |
| util/opentelemetry-util-genai/src/opentelemetry/util/genai/_agent_invocation.py | Stops emitting gen_ai.provider.name for agent invocations (spans + metrics). |
| util/opentelemetry-util-genai/tests/test_handler_agent.py | Updates expectations and call sites for agent spans/metrics without provider. |
| util/opentelemetry-util-genai/tests/test_handler_completion_hook.py | Updates agent hook tests for the new handler call pattern. |
| policies/genai_span_validation.rego | Updates required attributes for invoke_agent based on span kind (internal vs client). |
| instrumentation/opentelemetry-instrumentation-genai-langchain/src/opentelemetry/instrumentation/genai/langchain/callback_handler.py | Removes provider when starting local agent spans. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_callback_handler.py | Updates assertions for the adjusted handler call signature. |
Comment on lines
390
to
394
| def start_invoke_local_agent( | ||
| self, | ||
| provider: str, | ||
| *, | ||
| request_model: str | None = None, | ||
| agent_name: str | None = None, |
Member
Author
There was a problem hiding this comment.
This is not used by anything that's been released
trask
approved these changes
Jun 18, 2026
eternalcuriouslearner
approved these changes
Jun 18, 2026
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.
SemConv PR: open-telemetry/semantic-conventions-genai#289