Skip to content

feat(querier): RFC 0033 green (observability) — lookup-outcome telemetry, .7 - #513

Merged
jensholdgaard merged 3 commits into
mainfrom
rfc0033-green-observability
Jul 13, 2026
Merged

feat(querier): RFC 0033 green (observability) — lookup-outcome telemetry, .7#513
jensholdgaard merged 3 commits into
mainfrom
rfc0033-green-observability

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

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 into ourios-semconv with CI's weaver pin):

  • ourios.template_map.lookups (counter) with ourios.template_map.lookup.outcomehit | 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) with ourios.template_map.publish.outcomepublished | 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 TemplateMapMetrics on global::meter("ourios.template_map") (the miner/compaction API-only pattern). Lookups record inside load_or_derive (both the hit early-return and the fallthrough); publish outcomes record at the publish_bytes choke point plus the serialization-failure arms. Acquisition bytes needed no new instrument — §3.7 covers them via the registry_bytes_read contract amendment that landed in the freshness slice.

Test (rfc0033_7_observability.rs, own process per the rfc0016_6_query_metrics in-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-bench335 passed, 11 skipped, re-verified after rebasing onto the merged #512.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y

…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
@jensholdgaard
jensholdgaard requested a review from Copilot July 13, 2026 13:44
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d0a61442-2ab3-4757-a725-fa6e9953dccc

📥 Commits

Reviewing files that changed from the base of the PR and between c43d5cb and 4f1bfa1.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • crates/ourios-querier/Cargo.toml
  • crates/ourios-querier/src/template_map.rs
  • crates/ourios-querier/tests/it/main.rs
  • crates/ourios-querier/tests/it/rfc0033_cached_template_map.rs
  • crates/ourios-querier/tests/rfc0033_7_observability.rs
  • crates/ourios-semconv/src/lib.rs
  • semconv/registry/attributes.yaml
  • semconv/registry/metrics.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0033-green-observability

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 regenerate ourios-semconv constants.
  • 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 MeterProvider and 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.

Comment thread crates/ourios-querier/tests/rfc0033_7_observability.rs
…extra attributes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Comment thread crates/ourios-querier/src/template_map.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.

@jensholdgaard
jensholdgaard merged commit 707950d into main Jul 13, 2026
26 checks passed
jensholdgaard added a commit that referenced this pull request Jul 13, 2026
.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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants