Tighten rego span checks: error.type, retrieval span name, agent provider#277
Merged
lmolkova merged 1 commit intoJul 16, 2026
Merged
Conversation
lmolkova
commented
Jul 16, 2026
Member
- Add error.type <-> error-status cross-check (must be set on failure, must not appear otherwise).
- Add the retrieval span-name-format key (gen_ai.data_source.id).
- Require gen_ai.provider.name on invoke_agent (client) spans.
…ider - Add error.type <-> error-status cross-check (must be set on failure, must not appear otherwise). - Add the retrieval span-name-format key (gen_ai.data_source.id). - Require gen_ai.provider.name on invoke_agent (client) spans.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the Weaver live-check Rego policy for GenAI spans by adding a few cross-field validations and aligning span-name formatting checks with newer operation conventions.
Changes:
- Enforces
error.type↔status.codeconsistency: required onstatus.code=="error"and forbidden otherwise. - Adds span-name keyed attribute support for
retrievalspans viagen_ai.data_source.id. - Requires
gen_ai.provider.nameoninvoke_agentspans whenkind=="client"(alongside the existing always-emitserver.addressexpectation).
eternalcuriouslearner
approved these changes
Jul 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Jul 16, 2026
Merged
via the queue into
open-telemetry:main
with commit Jul 16, 2026
64a8297
66 of 67 checks passed
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.