On a Monday morning, the payment latency alert stops firing. Nobody touched the rule: a team simply renamed a metric in their service. The fix is a guardrail that runs before production, not after. OpenTelemetry Weaver is the OpenTelemetry project’s tool for treating your signals as a public API: you describe them in a registry, then check them in continuous integration.
This article starts from the operating decision (where to put the check, and how strict to be) rather than a tour of the commands. It complements the article on semantic convention stability, which explains what the specification promises; here we automate the verification. The facts come from the official repository (README, documentation, CHANGELOG), read on 13 November 2026. I did not run Weaver for this article, so the examples are templates for you to test.
In brief
- Weaver works at three levels: the registry (
registry check), the gap between two versions (--baseline-registry,registry diff) and the telemetry actually emitted (registry live-check). - All three plug into a CI job; the repository ships GitHub Actions to install the tool and drive live-check.
- Start tolerant (
fail-on: none), then tighten once the initial noise is dealt with. - For Dynatrace SaaS and Managed alike, everything happens before ingestion: Weaver depends on no back end.
OpenTelemetry Weaver: where should the guardrail go?
The useful question is not « which command do I run » but « when does a naming drift cost least ». There are three moments, and each catches different mistakes.
- When the registry is reviewed. You describe attributes, metrics and spans in YAML files. The check catches a malformed file, a broken reference or a violated house rule.
- When versions are compared. You compare the branch with a reference version. A rename or removal shows up during review, before it reaches a dashboard.
- During integration tests. The application sends real telemetry to a local OTLP receiver. Weaver compares it with the registry and flags an unknown attribute or a wrong type.
The first level checks what you wrote; the third checks what the code really does. Neither replaces the other.
Step 1: check the registry on every pull request
A custom registry is a folder with a manifest.yaml file and convention files. The manifest gives a name, a versioned schema_url and, if needed, dependencies such as the official semantic conventions. Here is a minimal template for a fictional payment service.
# model/manifest.yaml
name: payment
description: Signals of the payment service
schema_url: https://example.test/schemas/payment/1.0.0
dependencies:
- schema_url: https://opentelemetry.io/schemas/1.41.1
registry_path: https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.41.1.tar.gz[model]
The registry_path field accepts a folder, an archive or a Git URL. The documentation says a dependency’s schema_url must follow the OpenTelemetry schema URL format and include a version. Pin a dependency version rather than a branch: a reproducible check should not change because upstream moved.
The CI job installs the tool, then runs the validation. The repository offers the setup-weaver action for that, with a version option to pin the binary.
The gh_workflow_command format turns each finding into a GitHub annotation, visible right in the pull request. The default format, ansi, suits a terminal; json is for processing results in a script.
Add your own rules with Rego
House rules are written in Rego, the Open Policy Agent language, and passed with --policy. Each finding carries a level: information (context), improvement (suggested change) or violation (to fix before the schema is published). Example rule: require a unit on every metric.
package after_resolution
deny contains finding if {
metric := input.metrics[_]
not metric.unit
finding := {
"id": "missing_metric_unit",
"message": sprintf("Metric '%s' must declare a unit", [metric.name]),
"level": "violation",
"signal_type": "metric",
"signal_name": metric.name
}
}
This template follows the structure documented in the repository (id, message and level fields). Use violation for what must block, improvement for what should only be seen.
Step 2: spot renames before review
A registry check cannot tell whether a name changed since the last published version. For that, weaver registry check accepts --baseline-registry, and weaver registry diff produces a report of differences between two versions. The documentation lists the change types: added, renamed, updated, obsoleted, removed and uncategorized.
The limit is written in the repository: the diff covers top-level objects (attributes, metrics, events, spans, resources) and does not compare their inner fields. A unit change inside a metric can therefore slip past this report, so human review is still needed. The report also comes in markdown, handy to post as a pull request comment.
Step 3: validate real telemetry with live-check
A perfect registry does not prove the code follows it. The weaver registry live-check command starts an OTLP receiver, compares what arrives with the registry and produces a report. Built-in checks cover, among others, missing attributes (missing_attribute) and wrong types (type_mismatch).
In GitHub CI, two actions wrap your tests: weaver-live-check-start launches the listener (gRPC, port 4317 by default, loopback only) and exposes the address to use as OTEL_EXPORTER_OTLP_ENDPOINT; weaver-live-check-stop fetches the report, uploads it as an artefact and fails the job according to fail-on (violation by default). Put the stop step under if: always() so no listener is left behind. Per their README, these actions only run on Linux in their current version.
Cut the noise without hiding real defects
On the first run, expect many findings. Two levers exist in the .weaver.toml file: finding_filters drops targeted findings, finding_level_overrides changes their level instead of hiding them.
A sensible path: fail-on: none for two weeks to measure, one filter per documented false positive, then fail-on: violation. The report also includes a registry coverage indicator (registry_coverage), useful to see which parts of your schema the tests never exercise.
How to check that it works
- Deliberately introduce a defect on a test branch: a badly named attribute in the registry, or a metric without a unit if your Rego rule exists.
- Open the pull request: the job must fail and the annotation must appear on the relevant line.
- For live-check, make a test emit an attribute that is not in the registry: the report downloaded as an artefact must contain a
missing_attributefinding. - Fix and rerun: the job must go green again. A check that has never failed is not proven.
Project status and precautions
The repository is under the Apache-2.0 licence, and its README shows the project’s CI badges and an OpenSSF score. The CHANGELOG lists version 0.28.0 dated 14 October 2026 and an « Unreleased » section with two breaking changes: a move to a stricter YAML 1.2 parser (the literals yes/no no longer become booleans, and semantic conventions older than v1.28.0 are no longer supported), and a requirement of at least one identity attribute per entity in the v2 schema. A 0.x project can break your CI on an upgrade, so pin the tool version and read the CHANGELOG before changing it.
Not verified here: the exact exit-code behaviour of registry check for each finding level, and the output on your own registry. Test with a deliberate defect before blocking merges.
Best practices
- Pin the Weaver version and the semantic conventions version in CI.
- Keep Rego rules short, with a message that says how to fix the problem.
- Treat a signal rename as an API change: old and new names side by side during migration, as in checking Prometheus alerting rules in CI.
- Give the same registry to the Collector owners and the teams: see the OpenTelemetry Collector to rename or transform in the pipeline if a migration requires it.
- Remember what a span is: the anatomy of a span helps you write rules aimed at the right signal.
Frequently asked questions
Does Weaver replace the OpenTelemetry semantic conventions?
No. It reads the official conventions as a registry, lets you add your own and checks consistency. The conventions are still published by the OpenTelemetry project.
Do I need a particular back end, such as Dynatrace?
No. Live-check receives OTLP directly, with no back end. Dynatrace SaaS or Managed only comes in afterwards: a clean name at emission keeps your queries stable.
Can I start without blocking teams?
Yes. Use fail-on: none on live-check, read the report, filter the false positives, then move to violation.
Conclusion
A metric name is a contract between the team that emits and the team that alerts. Weaver makes that contract testable: a checked registry, a diff read in review, a live-check in the tests. Sources: the OpenTelemetry Weaver repository and the OpenTelemetry blog post cited by its README.
span.observer is an independent community blog, not affiliated with Dynatrace LLC or the OpenTelemetry project. Brands mentioned belong to their owners. Tools change quickly: check names and options in the official documentation.
Originally published on span.observer. French version: https://span.observer/fr/opentelemetry-weaver-valider-conventions-ci/.


Top comments (0)