• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prisma-risk / tsoracle / 26247481216
95%

Build:
DEFAULT BRANCH: main
Ran 21 May 2026 07:14PM UTC
Jobs 1
Files 46
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 May 2026 07:11PM UTC coverage: 95.284% (+0.01%) from 95.274%
26247481216

push

github

web-flow
feat(server): emit operational metrics via the metrics crate facade (#41)

The seven signals already cataloged in `docs/operations.md` (get_ts,
window extension, leader transition, not-leader) were previously only
documented. This wires emission against the `metrics` crate facade so
embedders can install whatever recorder they want
(`metrics-exporter-prometheus`, `metrics-exporter-influx`, a custom
sink) without binding tsoracle to a specific exporter.

The dependency is gated behind a new `metrics` Cargo feature on
`tsoracle-server`, off by default, so embedders who do not want it pay
zero compile-time cost and the default build produces no `metrics::`
symbols.

Emission sites:
- `get_ts.total` (+1) and `get_ts.timestamps_issued` (+ `grant.count`)
  on the GetTs success path.
- `window.extensions.total` and `window.extension_latency` (seconds)
  around the `persist_high_water` await — placed after the
  recheck-after-acquire short-circuit so the counter reflects actual
  consensus round-trips, not coalesced stampeders.
- `leader_transition.total` per `LeaderState` event observed (every
  event the driver surfaces counts as a transition), and
  `leader_transition.fence_latency` (seconds) spanning the full
  Leader-branch fence — drain barrier wait, durable persist, allocator
  seed, and `Serving` publication.
- `not_leader.total` inside `not_leader_status`, the single chokepoint
  every NOT_LEADER rejection routes through.

A new `tests/metrics.rs` drives a representative scenario (leader-up
fence -> successful GetTs -> sleep past `failover_advance` to force a
window extension -> step down to follower -> NOT_LEADER rejection)
against `metrics-util`'s `DebuggingRecorder` and asserts each
documented signal fires at least once. The test binary is gated on
`["test-support", "metrics"]`; integration tests in other binaries
remain unaffected.

Both `docs/operations.md` and `crates/tsoracle-server/src/docs/operations.md`
drop the "not yet emitted" caveat and... (continued)

13 of 13 new or added lines in 3 files covered. (100.0%)

5314 of 5577 relevant lines covered (95.28%)

99892.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26247481216.1 21 May 2026 07:14PM UTC 46
95.28
GitHub Action Run
Source Files on build 26247481216
  • Tree
  • List 46
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26247481216
  • 85efd6e0 on github
  • Prev Build on main (#26246147346)
  • Next Build on main (#26248594833)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc