Skip to content

feat: F09 Request Metrics — complete deferred items#108

Merged
leocamello merged 1 commit intomainfrom
009-request-metrics-completion
Feb 13, 2026
Merged

feat: F09 Request Metrics — complete deferred items#108
leocamello merged 1 commit intomainfrom
009-request-metrics-completion

Conversation

@leocamello
Copy link
Owner

@leocamello leocamello commented Feb 13, 2026

Summary

Complete all 23 deferred Phase 7 items for F09 Request Metrics. Every task is now checked [x] (78/78).

Added

  • 22 integration tests (tests/metrics_integration.rs): Contract tests for /metrics and /v1/stats, counter/histogram/gauge tracking, per-backend stats breakdown, content-type validation, comprehensive end-to-end test, FR-020 compatibility
  • 4 Criterion benchmarks (benches/metrics.rs): metric recording overhead (~188ns), /metrics render (~3.8µs), /v1/stats compute (~5.9µs), label sanitization (~50ns cached / ~359ns uncached)
  • 2 property tests (src/metrics/mod.rs): Prometheus label regex compliance, sanitization idempotency
  • requirements-validation.md: Spec quality gate checklist (56 checked, 9 N/A, 0 unchecked)
  • README Observability section: Documents /metrics and /v1/stats endpoints

Changed

  • /metrics endpoint now returns proper Prometheus content-type: text/plain; version=0.0.4 header (T068)
  • quickstart.md: Fixed dependency versions (0.24/0.16), module structure (no collector.rs), handler code, startup initialization, and test examples to match actual implementation (T073)
  • Cargo.toml: Added [[bench]] entries with harness = false for all Criterion benchmark files (cli_startup, config_parsing, metrics) — benchmarks were previously compiling but not executing

Updated

  • tasks.md: 78/78 items complete (0 deferred, 0 unchecked)
  • verification.md: VER-003 updated to reflect fully completed deferred work

Test Results

  • 389 tests pass (284 unit + 105 integration)
  • Clippy clean (-D warnings)
  • All benchmarks pass with overhead well under 0.1ms requirement
  • Format check clean

@leocamello leocamello added the enhancement New feature or request label Feb 13, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.38%. Comparing base (ebbbbde) to head (41c0bd0).
✅ All tests successful. No failed tests found.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   78.45%   82.38%   +3.92%     
==========================================
  Files          34       34              
  Lines        1453     1453              
==========================================
+ Hits         1140     1197      +57     
+ Misses        313      256      -57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…operty tests

- Add 22 integration tests in tests/metrics_integration.rs covering
  T016-T054, T068, T074, T075 (endpoint contracts, counters, histograms,
  gauges, per-backend stats, content-type, comprehensive e2e, FR-020)
- Add 4 Criterion benchmarks in benches/metrics.rs (recording overhead
  ~188ns, /metrics render ~3.8µs, /v1/stats compute ~5.9µs, label
  sanitization ~50ns cached / ~359ns uncached)
- Add 2 property tests for label sanitization in src/metrics/mod.rs
  (Prometheus regex compliance, idempotency)
- Fix Cargo.toml: add [[bench]] entries with harness=false for all
  benchmark files (cli_startup, config_parsing, metrics)
- Add Prometheus content-type header to /metrics endpoint (T068)
- Fix quickstart.md: correct versions, module structure, code examples
  to match actual implementation (T073)
- Add comprehensive end-to-end integration test covering all 4 user
  stories (T074)
- Create requirements-validation.md (spec quality gate)
- Update README.md with Observability section (/metrics and /v1/stats)
- Update tasks.md: all 78/78 items complete
- Update verification.md: VER-003 reflects completed deferred work
@leocamello leocamello force-pushed the 009-request-metrics-completion branch from 63ec48c to 41c0bd0 Compare February 13, 2026 00:27
@leocamello leocamello merged commit c7bbcbd into main Feb 13, 2026
9 checks passed
@leocamello leocamello deleted the 009-request-metrics-completion branch February 13, 2026 00:35
leocamello added a commit that referenced this pull request Feb 17, 2026
…operty tests (#108)

- Add 22 integration tests in tests/metrics_integration.rs covering
  T016-T054, T068, T074, T075 (endpoint contracts, counters, histograms,
  gauges, per-backend stats, content-type, comprehensive e2e, FR-020)
- Add 4 Criterion benchmarks in benches/metrics.rs (recording overhead
  ~188ns, /metrics render ~3.8µs, /v1/stats compute ~5.9µs, label
  sanitization ~50ns cached / ~359ns uncached)
- Add 2 property tests for label sanitization in src/metrics/mod.rs
  (Prometheus regex compliance, idempotency)
- Fix Cargo.toml: add [[bench]] entries with harness=false for all
  benchmark files (cli_startup, config_parsing, metrics)
- Add Prometheus content-type header to /metrics endpoint (T068)
- Fix quickstart.md: correct versions, module structure, code examples
  to match actual implementation (T073)
- Add comprehensive end-to-end integration test covering all 4 user
  stories (T074)
- Create requirements-validation.md (spec quality gate)
- Update README.md with Observability section (/metrics and /v1/stats)
- Update tasks.md: all 78/78 items complete
- Update verification.md: VER-003 reflects completed deferred work
leocamello added a commit that referenced this pull request Feb 17, 2026
…operty tests (#108)

- Add 22 integration tests in tests/metrics_integration.rs covering
  T016-T054, T068, T074, T075 (endpoint contracts, counters, histograms,
  gauges, per-backend stats, content-type, comprehensive e2e, FR-020)
- Add 4 Criterion benchmarks in benches/metrics.rs (recording overhead
  ~188ns, /metrics render ~3.8µs, /v1/stats compute ~5.9µs, label
  sanitization ~50ns cached / ~359ns uncached)
- Add 2 property tests for label sanitization in src/metrics/mod.rs
  (Prometheus regex compliance, idempotency)
- Fix Cargo.toml: add [[bench]] entries with harness=false for all
  benchmark files (cli_startup, config_parsing, metrics)
- Add Prometheus content-type header to /metrics endpoint (T068)
- Fix quickstart.md: correct versions, module structure, code examples
  to match actual implementation (T073)
- Add comprehensive end-to-end integration test covering all 4 user
  stories (T074)
- Create requirements-validation.md (spec quality gate)
- Update README.md with Observability section (/metrics and /v1/stats)
- Update tasks.md: all 78/78 items complete
- Update verification.md: VER-003 reflects completed deferred work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants