Watch
0
0
Fork
You've already forked hyperhive
0

swarm-review-classifier: test that Otel::record exports the run's cost

Nothing exercised the real record path: the acp tests use a mock sink and
the cost tests only covered amount(). Split the counter construction and
the add out of Otel::record so a test can run them against an in-memory
exporter, and assert the counter name, the amount and the four labels.

Dev-dependency: opentelemetry_sdk's `testing` feature (same crate; adds
tokio to its lockfile entry).
This commit is contained in:
atlas 2026-10-13 15:01:28 +02:00 • committed by mara
commit 2c6ae15383
3 changed files with 83 additions and 13 deletions

View file

@ -33,6 +33,8 @@ tracing.workspace = true
[dev-dependencies]
tempfile = "3"
# `InMemoryMetricExporter` for the cost counter test.
opentelemetry_sdk = { workspace = true, features = ["testing"] }
[lints]
workspace = true