Skip to content

Commit

Permalink
cleuan up
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 24, 2024
1 parent c9d0e88 commit 74154a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: policies checks
- name: verify semantic conventions yaml definitions
run: make check-policies
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,5 @@ check-policies:
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \
otel/weaver:${WEAVER_VERSION} registry check \
--registry=/source \
--policy=/policies/registry.rego \
--policy=/policies/attribute_name_collisions.rego
6 changes: 3 additions & 3 deletions policies/attribute_name_collisions.rego
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ attr_registry_collision(description, attr_name) = violation {
violation := {
"id": description,
"type": "semconv_attribute",
"category": "",
"category": "naming_collision",
"attr": attr_name,
"group": "",
}
Expand All @@ -42,5 +42,5 @@ attr_names_except(excluded) = names {
names := {n | n := input.groups[_].attributes[_].name} - excluded
}

excluded_const_collisions := {"m1essaging.client_id"}
excluded_namespace_collisions := {"m1essaging.operation", "db.operation"}
excluded_const_collisions := {"messaging.client_id"}
excluded_namespace_collisions := {"messaging.operation", "db.operation", "deployment.environment"}
2 changes: 1 addition & 1 deletion policies/registry.rego
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package before_resolution
attr_registry_violation(violation_id, group_id, attr_id) = violation {
violation := {
"id": violation_id,
"type": "semantic_convention_policies",
"type": "semconv_attribute",
"category": "attribute_registry_checks",
"group": group_id,
"attr": attr_id,
Expand Down

0 comments on commit 74154a5

Please sign in to comment.