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:
5 files changed
+98
-1
No files matched your search
@@ -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.
|
||||
Reference in new issue
Block a user