SkeLLLa / fastify-metrics

Prometheus metrics exporter for Fastify
https://savelife.in.ua/en/donate-en/
MIT License
99 stars 33 forks source link

Possibility to override route label value #79

Closed iamelevich closed 1 year ago

iamelevich commented 1 year ago

Added new config option: routeMetrics.overrides.labels.getRouteLabel to have ability to add custom logic to route label value.

The main reason why I need this:

Probably need to change priority and uses statsId first. Will be glad to see your thoughts.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (07ab256) 100.00% compared to head (5f0a8c5) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #79 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 2 2 Lines 137 140 +3 Branches 50 50 ========================================= + Hits 137 140 +3 ``` | [Impacted Files](https://codecov.io/gh/SkeLLLa/fastify-metrics/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex) | Coverage Δ | | |---|---|---| | [src/fastify-metrics.ts](https://codecov.io/gh/SkeLLLa/fastify-metrics/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex#diff-c3JjL2Zhc3RpZnktbWV0cmljcy50cw==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alex)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

SkeLLLa commented 1 year ago

Thanks for contribution, release as v10.1.0