Most semantic-convention policy checks are provided by the shared
opentelemetry-weaver-packages
repository and are consumed by make check-policies (see the check-policies
target in the Makefile). The following packages are delegated:
naming_conventions— name formats, namespace/constant collisions (attributes, metrics, events, entities), enum-member uniqueness, complex-type restrictions, metric brief formatting.stability— deprecation (renamed_to) validity, stable entities must have identity, and the stability-ordering check (a signal may not claim a higher stability than any attribute it references unless the attribute isopt_in).entity_associations—entity_associationsmust resolve to known entities.backwards-compatibility— no breaking changes vs. the baseline registry.
Only checks that are not available upstream are kept here:
brief.rego— requires a non-emptybriefon every attribute and signal. This is a semantic-conventions editorial requirement rather than a general registry rule.
Per-signal exceptions to the shared checks are declared in the model via
annotations.<package>.policy_exceptions, where the exception key is the
finding ID with the package prefix dropped. For example:
annotations:
naming_conventions:
policy_exceptions:
- metric_namespace_collision
stability:
policy_exceptions:
- metric_lower_stability_attributeLocal policies are unit-tested with OPA under ../policies_test
via make test-policies. The delegated packages carry their own tests in the
weaver-packages repository.