Skip to content

feat(observability): expose SPSC ring drop telemetry via control socket status and Prometheus metrics - #262

Merged
vxfemboy merged 5 commits into
mainfrom
feat/spsc-ring-drop-telemetry
Nov 19, 2026
Merged

vxfemboy merged 5 commits into
mainfrom
feat/spsc-ring-drop-telemetry

Conversation

@vxfemboy

Copy link
Copy Markdown
Member

Summary

This PR implements Issue #260 by exposing lock-free cross-shard SPSC ring drop telemetry via daemon control status and Prometheus metrics.

Key Changes

  1. Protocol & Serialization (crates/yip-proto):
    • Added #[serde(default)] pub spsc_queue_drops: u64 to ControlResponse::Status.
    • Guaranteed backward compatibility: older serialized status payloads lacking this field deserialize cleanly with a default value of 0.
  2. Control Plane Dispatch & CLI (bin/yipd/src/control.rs):
    • In dispatch_cmd, reads crate::sharding::SPSC_QUEUE_DROPS.load(Ordering::Relaxed).
    • Extracted format_cli_status for pure formatting logic and testability.
    • In human-readable yip status, surfaces Ring Drops: <count> in warning red when drops > 0, while keeping output clean when drops are 0.
    • In yip status --json, always emits "spsc_queue_drops": <count>.
  3. Prometheus Exposition (bin/yipd/src/metrics.rs):
    • Exports yip_spsc_queue_drops_total as a Prometheus 0.0.4 text counter with HELP and TYPE metadata.
  4. Documentation:
    • Added entry under [Unreleased] -> Added in CHANGELOG.md.

Verification

  • Unit & Integration Tests: cargo test across the entire workspace passed cleanly.
  • Linters: cargo fmt --check and cargo clippy --all-targets -- -D warnings passed with 0 warnings.
  • Mutation Testing: Diff-scoped cargo mutants caught 100% of mutants (30 caught, 2 unviable, 0 missed).
  • Constraints: #![forbid(unsafe_code)] preserved, zero hotpath allocations, strictly zero emojis.

Closes #260

@vxfemboy
vxfemboy temporarily deployed to benchmark-approval November 18, 2026 23:39 — with GitHub Actions Inactive
@vxfemboy
vxfemboy temporarily deployed to benchmark-approval November 18, 2026 23:39 — with GitHub Actions Inactive
@vxfemboy
vxfemboy temporarily deployed to benchmark-approval November 19, 2026 00:40 — with GitHub Actions Inactive
@vxfemboy
vxfemboy temporarily deployed to benchmark-approval November 19, 2026 00:40 — with GitHub Actions Inactive
@vxfemboy
vxfemboy merged commit 1754d34 into main Nov 19, 2026
13 checks passed
@vxfemboy
vxfemboy deleted the feat/spsc-ring-drop-telemetry branch November 19, 2026 16:15

This branch was previously deployed

1 inactive deployment
benchmark-approval — cb6d5096 Deployed Nov 19, 2026 by vxfemboy via benchmarks #210
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.

feat(observability): expose SPSC ring drop telemetry via control socket status and Prometheus metrics

1 participant