Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add policy enforcement for attribute registry. #1208

Merged
merged 9 commits into from
Jul 23, 2024

Conversation

jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Jul 3, 2024

  • Add REGO rules to enforce attribute registry things.
  • Add diagnostic rendering to improve error messages on attribute
    registry failure.

Example failure:

$ make check-policies
✔ SemConv registry loaded (138 files)
✔ SemConv registry resolved
Semantic Convention Model Validation Failures:

/source/metrics/jvm-metrics.yaml:
  Attribute jvm.memory.bad_name cannot be defined in Group attributes.jvm.memory
  Attribute Group not in Attribute Registry.

Replaces #1014

jsuereth added 4 commits July 3, 2024 12:05
- Add REGO rules to enforce attribute registry things.
- Add diagnostic rendering to improve error messages on attribute
  registry failure.

Example failure:

```
$ make check-policies
✔ SemConv registry loaded (138 files)
✔ SemConv registry resolved
Semantic Convention Model Validation Failures:

/source/metrics/jvm-metrics.yaml:
  Attribute jvm.memory.bad_name cannot be defined in Group attributes.jvm.memory
  Attribute Group not in Attribute Registry.
```
@jsuereth jsuereth requested review from a team July 3, 2024 21:09
@jsuereth jsuereth added the Skip Changelog Label to skip the changelog check label Jul 3, 2024
policies/registry.rego Outdated Show resolved Hide resolved
policies/registry.rego Outdated Show resolved Hide resolved
policies/registry.rego Outdated Show resolved Hide resolved
policies/registry.rego Outdated Show resolved Hide resolved
@jsuereth jsuereth merged commit 459fbdb into open-telemetry:main Jul 23, 2024
12 checks passed
@jsuereth jsuereth deleted the wip-policy-usage branch July 23, 2024 11:37
maryliag pushed a commit to maryliag/semantic-conventions that referenced this pull request Jul 30, 2024
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Label to skip the changelog check
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants