Repository navigation
feat(semconv-ai): standardize gen_ai.security.threat.* event and attribute names (#4096) - #4491
FinalSunFlower wants to merge 5 commits into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Security threat schema packages/opentelemetry-semantic-conventions-ai/opentelemetry/semconv_ai/__init__.py |
Adds the gen_ai.security.threat.detected event, six gen_ai.security.threat.* attributes, and enums for severity and action values. |
Security threat validation packages/opentelemetry-semantic-conventions-ai/tests/test_security_threat.py |
Tests the event value, attribute values, naming format, severity values, and action values. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Merge Risk: 
Minimal · previous review 46354
-
This change adds standardized threat event and attribute names without altering detection or runtime behavior, so it is mergeable with normal checks.
🚥 Pre-merge checks | ✅ 5
-
✅ Passed checks (5 passed)
-
Check name Status Explanation Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled. Title check ✅ Passed The title clearly and concisely describes the main change: adding standardized gen_ai.security.threat.* event and attribute names, including the new semantic convention definitions. Linked Issues check ✅ Passed The changes satisfy the coding requirements in issue #4096.Eventsaddsgen_ai.security.threat.detected.EventAttributesadds all six required attributes. The severity enum containslow, `medi…Out of Scope Changes check ✅ Passed The changes stay within issue #4096. The enums, documentation, and tests support the additive event and attribute schema. No dashboards, evaluator helpers, or unrelated implementation are shown.Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
ℹ️ Recent review info
-
⚙️ Run configuration
-
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: de554dd8-fc52-403e-aabe-18804a18dc90
📒 Files selected for processing (1)
-
packages/opentelemetry-semantic-conventions-ai/tests/test_security_threat.py
🚧 Files skipped from review as they are similar to previous changes (1)
-
- packages/opentelemetry-semantic-conventions-ai/tests/test_security_threat.py
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID:
de554dd8-fc52-403e-aabe-18804a18dc90
📒 Files selected for processing (1)
-
packages/opentelemetry-semantic-conventions-ai/tests/test_security_threat.py
🚧 Files skipped from review as they are similar to previous changes (1)
-
- packages/opentelemetry-semantic-conventions-ai/tests/test_security_threat.py
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.
-
|
Hi team, just bumping this PR when you have a moment. The CI workflows just need a quick approval to kick off the test suite. Happy to make any adjustments if needed! |
|
Hi team! Just a quick bump on this. It looks like the CI workflows are waiting for a maintainer's approval to run. Could someone please take a look and approve the run when you have a chance? Thank you!" |
Summary
gen_ai.security.threat.detectedevent constantTesting
python -m pytest packages/opentelemetry-semantic-conventions-ai/tests -qpython -m ruff check packages/opentelemetry-semantic-conventions-ai/opentelemetry packages/opentelemetry-semantic-conventions-ai/testsCloses #4096
Summary by CodeRabbit
New Features
Tests