Skip to content

Remove provider name from local agent span#132

Open
lmolkova wants to merge 7 commits into
open-telemetry:mainfrom
lmolkova:remove-provider-from-local-agent
Open

Remove provider name from local agent span#132
lmolkova wants to merge 7 commits into
open-telemetry:mainfrom
lmolkova:remove-provider-from-local-agent

Conversation

@lmolkova

Copy link
Copy Markdown
Member

@lmolkova lmolkova force-pushed the remove-provider-from-local-agent branch from 43f8d16 to d7e3056 Compare June 18, 2026 01:30
@lmolkova lmolkova marked this pull request as ready for review June 18, 2026 02:25
@lmolkova lmolkova requested a review from a team as a code owner June 18, 2026 02:25
Copilot AI review requested due to automatic review settings June 18, 2026 02:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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-genai ref to a newer commit.
  • Update opentelemetry-util-genai agent invocation APIs/attributes/tests to stop setting gen_ai.provider.name for invoke_agent.
  • Adjust span validation policy to treat invoke_agent expectations 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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not used by anything that's been released

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.

4 participants