Skip to content
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
27da7c6
doc gen
jerbly Feb 18, 2026
9f7d386
finding id definition
jerbly Feb 18, 2026
2af0e98
swapped consts for enum
jerbly Feb 18, 2026
f5c6ecb
generated finding id
jerbly Feb 18, 2026
e6c2402
code gen
jerbly Feb 18, 2026
c06c49e
event codegen
jerbly Feb 20, 2026
c341749
doc
jerbly Feb 20, 2026
b637715
From
jerbly Feb 20, 2026
ebf5f97
event note
jerbly Feb 20, 2026
9f1e5cf
from string
jerbly Feb 20, 2026
2ee68df
tidy
jerbly Feb 20, 2026
06f24f9
entities
jerbly Feb 20, 2026
799b364
live check
jerbly Feb 20, 2026
9a46efa
semconv 1.40
jerbly Feb 21, 2026
0b42b81
improve docs
jerbly Feb 22, 2026
197633f
test fix
jerbly Feb 22, 2026
1bcc8e7
doc corrections
jerbly Feb 22, 2026
2a172d3
review fixes
jerbly Feb 22, 2026
c40e5eb
improve
jerbly Feb 22, 2026
0fb11e6
review fixes
jerbly Feb 22, 2026
7438edd
improve shutdown
jerbly Feb 22, 2026
221b7bf
review fixes
jerbly Feb 22, 2026
385d290
check-generated xtask and CI
jerbly Feb 22, 2026
5ef8f95
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 22, 2026
8a2fee7
changelog
jerbly Feb 22, 2026
288e9fb
longer health check
jerbly Feb 22, 2026
adca1e2
changelog correction
jerbly Feb 22, 2026
df8877b
fix doc
jerbly Feb 22, 2026
6b313f4
exclude test from tarpaulin
jerbly Feb 22, 2026
e712ba2
fix coverage
jerbly Feb 23, 2026
d5f76c2
fix tarpaulin
jerbly Feb 23, 2026
660adb0
exclude live-check tests
jerbly Feb 23, 2026
97c853f
longer timeout
jerbly Feb 23, 2026
c2d7d51
Merge branch 'main' into live-check-doc
jerbly Feb 23, 2026
1dcb5d3
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 24, 2026
e2b1272
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 24, 2026
f53aa83
update to new manifest
jerbly Feb 25, 2026
5c5ff01
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 25, 2026
70aabaf
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 26, 2026
7de7540
Replace version with file_format in live_check.yaml
jerbly Feb 26, 2026
6ad74ca
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 26, 2026
4b9f7da
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 27, 2026
6459a54
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Feb 27, 2026
5e7015d
Update crates/weaver_live_check/model/live_check.yaml
jerbly Mar 1, 2026
ba07a78
Update crates/weaver_live_check/model/live_check.yaml
jerbly Mar 1, 2026
183f6b0
Update crates/weaver_live_check/model/live_check.yaml
jerbly Mar 1, 2026
a0de10c
Update crates/weaver_live_check/model/live_check.yaml
jerbly Mar 1, 2026
a61169e
Update crates/weaver_live_check/model/live_check.yaml
jerbly Mar 1, 2026
ff86b07
Update crates/weaver_live_check/model/manifest.yaml
jerbly Mar 1, 2026
e6cea09
updates for finding model changes
jerbly Mar 1, 2026
ac1606f
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Mar 4, 2026
ec0b338
removed semconv-group schema
jerbly Mar 4, 2026
42a277b
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Mar 20, 2026
6ded749
fixes post-merge
jerbly Mar 20, 2026
ce73494
docker to generate, justfile, remove xtask, add ci
jerbly Mar 20, 2026
2955cce
run the container as the host user
jerbly Mar 20, 2026
6e61c91
writable home directory for cache files
jerbly Mar 20, 2026
186bb7c
diff the entire generated/ and docs/ directories
jerbly Mar 20, 2026
05c3b7f
fix schema
jerbly Mar 20, 2026
31e0dce
Merge branch 'main' of https://github.com/open-telemetry/weaver into …
jerbly Apr 12, 2026
f5ab010
chore(deps): update serial_test to version 3.4.0 and assert_cmd to ve…
jerbly Apr 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
run: cargo test --workspace --no-default-features
- name: History check
run: cargo xtask history
- name: Check generated files are up to date
if: matrix.os == 'ubuntu-latest'
run: cargo xtask check-generated
msrv:
name: Check MSRV
runs-on: ubuntu-latest
Expand Down Expand Up @@ -279,7 +282,7 @@ jobs:
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Gather coverage
run: cargo tarpaulin --workspace --output-dir coverage --out lcov -e xtask -e weaver --exclude-files 'crates/weaver_forge/codegen_examples/expected_codegen/*'
run: cargo tarpaulin --workspace --output-dir coverage --out lcov --ignore-tests -e xtask -e weaver --exclude-files 'crates/weaver_forge/codegen_examples/expected_codegen/*' 'crates/weaver_live_check/tests/*'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- New feature ([#1100](https://github.com/open-telemetry/weaver/issues/1100)) - Set `--output=http` to have live-check send its report as the response to `/stop`. ([#1193](https://github.com/open-telemetry/weaver/pull/1193) by @jerbly)
- Unified output handling across all registry subcommands. Builtin output formats (json, yaml, jsonl) are now available in `registry stats`, `registry diff`, and `registry resolve`. `registry stats` also supports `--templates` for custom text output templates. ([#1200](https://github.com/open-telemetry/weaver/pull/1200) by @jerbly)
- New feature ([#1152](https://github.com/open-telemetry/weaver/issues/1152)) - Live-check with `--emit-otlp-logs` will now include the attributes from the resource in the emitted log record, this helps to identify the source of the finding in a multi-source environment. ([#1206](https://github.com/open-telemetry/weaver/pull/1206) by @jerbly)
- Live-check OTLP log findings are now dog-fooded: the event schema, attributes, and enumerations are defined in a semconv model and code-generated using Weaver's own templates. See [`finding.md`](crates/weaver_live_check/docs/finding.md) for the generated reference documentation and [`dog-fooding.md`](crates/weaver_live_check/docs/dog-fooding.md) for the full dog-fooding guide. ([#1232](https://github.com/open-telemetry/weaver/pull/1232) by @jerbly)
- New Experimental feature: `weaver registry infer` command that listens for OTLP telemetry and infers a semantic convention registry file from the received data. Supports spans, metrics, events, and resource attributes. Includes configurable gRPC address/port, admin server for graceful shutdown, and inactivity timeout. ([#1138](https://github.com/open-telemetry/weaver/pull/1138) by @ArthurSens)
- Use `schema_url` in registry manifest, dependencies, and resolved schema instead of `registry_url`. Parse registry name and version
from it. ([#1202](https://github.com/open-telemetry/weaver/pull/1202) by @lmolkova)
Expand Down
70 changes: 68 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ lto = "thin"
[workspace.lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
unused_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin)', 'cfg(tarpaulin_include)'] }
# unreachable_pub = "warn"
semicolon_in_expressions_from_macros = "warn"
missing_docs = "deny"
Expand Down
2 changes: 1 addition & 1 deletion crates/weaver_checker/src/finding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct PolicyFinding {
/// machine-readable string that categorizes the finding.
pub id: String,

/// The context associated with the finding e.g. { "attribute_name": "foo.bar", "attribute_value": "bar" }
/// The context associated with the finding e.g. { "attribute_key": "foo.bar", "attribute_value": "bar" }
/// The context should contain all dynamic parts of the message
/// Context values may be used with custom templates and filters to customize reports.
pub context: Value,
Expand Down
8 changes: 7 additions & 1 deletion crates/weaver_live_check/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ opentelemetry_sdk.workspace = true
opentelemetry-otlp.workspace = true
opentelemetry-stdout.workspace = true
tokio.workspace = true
strum = { version = "0.27.2", features = ["derive"] }

[dev-dependencies]
tempfile = "=3.25.0"
assert_cmd = "=2.1.2"
portpicker = "=0.1.1"
serde_yaml.workspace = true
serial_test = "=3.2.0"
tempfile = "=3.25.0"
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
ureq.workspace = true

[lints]
workspace = true
Expand Down
23 changes: 16 additions & 7 deletions crates/weaver_live_check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Live check is a developer tool for assessing sample telemetry and providing findings for improvement.

> **Dog-fooding**: Live Check uses Weaver's own semantic convention model and template engine to
> define its `finding` schema, generate Rust types and constants, and generate reference
> documentation — all from [`model/live_check.yaml`](model/live_check.yaml). An integration test
> validates the emitted OTLP log records against the model, catching any drift between the
> generated code and the schema. See [Dog-fooding](docs/dog-fooding.md) for details.

A Semantic Convention `Registry` is loaded for comparison with samples. `Ingesters` transform various input formats and sources into intermediary representations to be assessed by `Advisors`. The `PolicyFinding` produced is transformed via jinja templates to the required output format for downstream consumption.

```mermaid
Expand Down Expand Up @@ -88,7 +94,7 @@ As mentioned, a list of `PolicyFinding` is returned in the report for each sampl
- `signal_type`: _string_ - a type of the signal for which the finding is reported: `metric`, `span`, `log` or `resource`
- `signal_name`: _string_ - a name of the signal for which the finding is reported: metric name, event name or span name
- `context`: _any_ - a map that describes details about the finding in a structured way,
for example `{ "attribute_name": "foo.bar", "attribute_value": "bar" }`.
for example `{ "attribute_key": "foo.bar", "attribute_value": "bar" }`.
- `message`: _string_ - verbose string describing the finding. It contains the same details as `context` but
is formatted and human-readable.

Expand All @@ -100,7 +106,7 @@ As mentioned, a list of `PolicyFinding` is returned in the report for each sampl
"level": "violation",
"id": "missing_attribute",
"message": "Attribute `hello` does not exist in the registry.",
"context": { "attribute_name": "hello" },
"context": { "attribute_key": "hello" },
"signal_name": "http.client.request.duration",
"signal_type": "metric"
}
Expand Down Expand Up @@ -132,7 +138,7 @@ deny contains make_finding(id, level, context, message) if {
id := "contains_test"
level := "violation"
context := {
"attribute_name": input.sample.attribute.name
"attribute_key": input.sample.attribute.name
}
message := sprintf("Attribute name must not contain 'test', but was '%s'", [input.sample.attribute.name])
}
Expand Down Expand Up @@ -254,6 +260,9 @@ weaver registry live-check --emit-otlp-logs --otlp-logs-stdout

### Log Record Structure

> For the full auto-generated reference of finding attributes, enum values, and the event schema,
> see [docs/finding.md](docs/finding.md).

Each policy finding is emitted as an OTLP log record with the following structure:

**Body**: The finding message (e.g., "Required attribute 'server.address' is not present.")
Expand All @@ -275,10 +284,10 @@ Each policy finding is emitted as an OTLP log record with the following structur
- `weaver.finding.id`: Finding type identifier (e.g., "required_attribute_not_present")
- `weaver.finding.level`: Finding level as string ("violation", "improvement", "information")
- `weaver.finding.context.<key>`: Key-value pairs provided in the context. Each pair is recorded as a single attribute.
- `weaver.finding.sample_type`: Sample type (e.g., "attribute", "span", "metric")
- `weaver.finding.signal_type`: Signal type (e.g., "span", "event", "metric")
- `weaver.finding.signal_name`: Signal name (e.g., event name or metric name)
- `weaver.finding.resource_attribute.<key>`: Resource attributes from the original telemetry source that produced the finding
- `weaver.finding.sample.type`: Sample type (e.g., "attribute", "span", "metric")
- `weaver.finding.signal.type`: Signal type (e.g., "span", "metric", "log")
- `weaver.finding.signal.name`: Signal name (e.g., event name or metric name)
- `weaver.finding.resource.attribute.<key>`: Resource attributes from the original telemetry source that produced the finding

## Continuous Running Sessions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deny contains make_advice(advice_type, advice_level, advice_context, message) if
advice_type := "contains_test"
advice_level := "violation"
advice_context := {
"attribute_name": input.sample.attribute.name
"attribute_key": input.sample.attribute.name
}
message := sprintf("Attribute name must not contain 'test', but was '%s'", [input.sample.attribute.name])
}
Expand Down
Loading