jochen-schweizer / express-prom-bundle

express middleware with standard prometheus metrics in one bundle
MIT License
310 stars 68 forks source link

Describes httpDurationMetricName option on README #81

Closed matheuslc closed 3 years ago

matheuslc commented 3 years ago

Problem

I have some other services being exporting Prometheus metrics, but, the name of HTTP duration metric is http_server_requests_seconds, and I have a dimension with my app name. This way is more easy to see all services metrics or only one service metric.

Solution

I need to change the name of the metric to include my new service as a dimension. Reading the code, I learned that I can do that using httpDurationMetricName option. This was not described in the README, so I'm doing this now.