dminuoso / servant-prometheus

Automatically produce per-endpoint monitoring for servant apps
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

ability to resolve path fragments to labels #3

Open dsvensson opened 6 years ago

dsvensson commented 6 years ago

In addition to #2, it would be neat if it was possible to indicate certain path fragments that should be resolved into labels on the fly. Say you have a path like:

/foo/bar/:some-enum/meh

...a GET to this path would bump:

http_request_total{job="myjob", method="GET", status="203", some_enum="thevalue"}

Maybe it would be possible to add additional metadata to QueryParam(s) and Capture to specify if they should be possible to resolve.