feat(metrics): declare the package and what it refuses to label

The README carries the cardinality rule up front: label on route, which the
route table bounds, never on name, which nothing bounds. That is the mistake
issue #65 was filed for and the one a collector makes by default.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-18 13:25:48 -05:00
1 parent f72c391646
commit 22e77ee452
5 files changed
+98 -1

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# Changelog
## [Unreleased]
### Added
- `metrics({ provides? })`: subscribes to the lifecycle stream and publishes a `Metrics` with
`render()`. Counts `request:end` as requests and `request:failed` separately, labelled on the
bounded `route` rather than on the caller-controlled `name`. `prometheus` is a `TransformerFn` for
serving `render()` from a route the application owns. Closes green-tea#68.