express-prom-bundle
express-prom-bundle copied to clipboard
feat: add upMetricName params to allow for up metric name customization
This pull request introduces a new configuration option to customize the name of the "up" metric in the HTTP metrics library, enhancing flexibility for users. The most important changes include updates to the documentation, the addition of the new option in the code, and its integration into the metric creation logic.
Documentation Updates:
- Added a description for the new
upMetricNameoption in theREADME.md, which allows users to customize the name of the "up" metric. The default remains asup.
Code Enhancements:
- Introduced the
upMetricNameconfiguration option in themainfunction ofsrc/index.js, defaulting toupif not provided. - Updated the metric creation logic to use the customizable
upMetricNameinstead of the hardcodedup, ensuring the new option is applied when creating the "up" metric.
Fix the issue #122