feat(querier): RFC 0033 green (observability) — lookup-outcome telemetry, .7 - #513
Conversation
…try, .7 RFC0033.7: the §3.7 instruments land on the cached template-map path. `ourios.template_map.lookups` records every `load_or_derive` outcome (hit / miss / stale / torn / unknown_version) on one counter's required outcome attribute; `ourios.template_map.publishes` records every artifact publish (published / lost_race / error — the best-effort write-through's only failure surface); `ourios.template_map.artifact.size` records the published artifact's byte size (the RFC0033.6 gate number). Names are minted in the weaver registry (`semconv/registry/`) and consumed via the regenerated `ourios-semconv` constants; the instruments resolve through the process-global meter (RFC 0001 §6.8 API/SDK split). The .7 scenario test drives a miss, a hit, a staleness, and a torn artifact through the public query surface against the RFC 0016 in-memory metrics pipeline and asserts each outcome's series plus the three publish-size samples. It installs a process-global MeterProvider, so it lives in its own integration binary (the rfc0016_6_query_metrics precedent; the one RFC0028.2 process-isolation exemption in the crate). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Implements RFC 0033’s observability green slice (.7) by registering and wiring lookup/publish outcome telemetry (and artifact-size histogram) for the querier’s cached template-map, plus an end-to-end integration test validating the exported metric series.
Changes:
- Add new semantic convention registry entries for
ourios.template_map.*metrics and outcome attributes, and regenerateourios-semconvconstants. - Instrument
ourios-querier’s template-map cache read/publish paths to record lookup outcomes, publish outcomes, and successful artifact sizes. - Add a dedicated integration test binary that installs an in-memory global
MeterProviderand asserts exact per-outcome datapoints.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| semconv/registry/metrics.yaml | Registers the new template-map metrics (lookups, publishes, artifact.size). |
| semconv/registry/attributes.yaml | Adds enum attributes for lookup/publish outcome dimensions. |
| crates/ourios-semconv/src/lib.rs | Adds weaver-generated constants for the new metric and attribute keys. |
| crates/ourios-querier/src/template_map.rs | Records lookup/publish outcome counters and artifact size histogram at the relevant choke points. |
| crates/ourios-querier/tests/rfc0033_7_observability.rs | New isolated-process integration test asserting exported metric series and histogram totals. |
| crates/ourios-querier/tests/it/rfc0033_cached_template_map.rs | Removes the old ignored stub and updates scenario placement notes. |
| crates/ourios-querier/tests/it/main.rs | Documents the RFC0028.2 process-isolation exemption for the new metrics test binary. |
| crates/ourios-querier/Cargo.toml | Adds opentelemetry (API) + semconv dependency, plus SDK/testing deps for the new test. |
| Cargo.lock | Lockfile updates for the new dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…extra attributes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
…swered Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
.1 fold+format (#509), .3 publish (#510), .2/.4/.5 freshness + write-through (#511), .6 comparative cold-vs-warm (#512, local arm 55.8x past the 10x gate), .7 observability (#513). The headline-corpus warm measurement runs as comparative dispatch run #20. Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
What
RFC 0033's observability green slice — discharges RFC0033.7, the last open §5 scenario. The §3.7 lookup-outcome telemetry, through the weaver registry.
Registered names (
semconv/registry/, constants regenerated intoourios-semconvwith CI's weaver pin):ourios.template_map.lookups(counter) withourios.template_map.lookup.outcome∈hit | miss | stale | torn | unknown_version— the §3.3 dispositions as attributes on ONE instrument, per the project's error-dimension convention.ourios.template_map.publishes(counter) withourios.template_map.publish.outcome∈published | lost_race | error(§3.7's exact vocabulary). The abstention path deliberately records nothing — a publish that never starts is none of the three.ourios.template_map.artifact.size(histogram,By) on every successful publish — the RFC0033.6 gate number, now observable in production.Wiring: a private
TemplateMapMetricsonglobal::meter("ourios.template_map")(the miner/compaction API-only pattern). Lookups record insideload_or_derive(both the hit early-return and the fallthrough); publish outcomes record at thepublish_byteschoke point plus the serialization-failure arms. Acquisition bytes needed no new instrument — §3.7 covers them via theregistry_bytes_readcontract amendment that landed in the freshness slice.Test (
rfc0033_7_observability.rs, own process per therfc0016_6_query_metricsin-memory-exporter precedent; noted as an RFC0028.2 exemption): four end-to-end queries against real audit Parquet drive miss → hit → stale (appended audit file) → torn (in-place truncation), asserting the exact per-outcome datapoint map{miss:1, hit:1, stale:1, torn:1}, publishes{published:3}, and the size histogram (count 3, sum == the three observed on-disk artifact sizes).RFC status
With .7 green, all seven §5 scenarios are discharged; the red→green status flip follows as its own PR.
Checks run
cargo fmt --all --check;cargo clippy --all-targets --all-features -- -D warnings(workspace, exit checked unmasked); weaver regenerate idempotent (no-diff gate); strict rustdoc;cargo nextest run -p ourios-querier -p ourios-semconv -p ourios-bench— 335 passed, 11 skipped, re-verified after rebasing onto the merged #512.🤖 Generated with Claude Code
https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y