Skip to content

Tighten rego span checks: error.type, retrieval span name, agent provider#277

Merged
lmolkova merged 1 commit into
open-telemetry:mainfrom
lmolkova:chore/rego-span-check-tightening
Jul 16, 2026
Merged

Tighten rego span checks: error.type, retrieval span name, agent provider#277
lmolkova merged 1 commit into
open-telemetry:mainfrom
lmolkova:chore/rego-span-check-tightening

Conversation

@lmolkova

Copy link
Copy Markdown
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.

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 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.typestatus.code consistency: required on status.code=="error" and forbidden otherwise.
  • Adds span-name keyed attribute support for retrieval spans via gen_ai.data_source.id.
  • Requires gen_ai.provider.name on invoke_agent spans when kind=="client" (alongside the existing always-emit server.address expectation).

@lmolkova lmolkova added the Skip Changelog PR does not require a changelog entry label Jul 16, 2026
@lmolkova
lmolkova added this pull request to the merge queue Jul 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 16, 2026
@lmolkova
lmolkova added this pull request to the merge queue Jul 16, 2026
Merged via the queue into open-telemetry:main with commit 64a8297 Jul 16, 2026
66 of 67 checks passed
@lmolkova
lmolkova deleted the chore/rego-span-check-tightening branch July 16, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Development

Successfully merging this pull request may close these issues.

3 participants