Commit 40edf83
Add Prometheus metrics endpoint and instrumentation (#21)
* Add Prometheus metrics endpoint and request instrumentation
Expose operational metrics at GET /metrics (unauthenticated) using the
metrics + metrics-exporter-prometheus crates. Instruments HTTP request
counts/durations, active/streaming connections, cache hits/misses,
signing durations, upstream latency, and error counters across all
proxy modules. Existing GET /v1/metrics (backend passthrough) is
unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address Copilot review feedback on metrics PR
- cache.rs: Add comment that moka entry_count() is O(1)
- signing.rs: Split signature duration histogram by algorithm for
per-algo performance visibility
- metrics_middleware.rs: Improve panic message in setup_metrics_recorder
to help operators debug recorder conflicts
- error.rs: Reorder upstream error branch for clarity (comment before
counter, no functional change)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0fbbcf6 commit 40edf83
12 files changed
Lines changed: 368 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
0 commit comments