Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gh-720 Use express path templates for prometheus metrics #724

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

checketts
Copy link
Contributor

Changes from:

http_request_duration_milliseconds_sum{path="/api/admin/features/myFeature/toggle/on",method="POST",status="200"} 51.16884
http_request_duration_milliseconds_count{path="/api/admin/features/myFeature/toggle/on",method="POST",status="200"} 2

to

http_request_duration_milliseconds_sum{path="/api/admin/features/:featureName/toggle/on",method="POST",status="200"} 51.16884
http_request_duration_milliseconds_count{path="/api/admin/features/:featureName/toggle/on",method="POST",status="200"} 2

Note :featureName. I didn't adopt the express-prometheus-middleware technique, because it just tried to regex out IDs and didn't seem to really solve it. The req had what we needed instead. (Just had to read the docs ;) )

@coveralls
Copy link

coveralls commented Feb 12, 2021

Coverage Status

Coverage decreased (-0.0007%) to 96.023% when pulling 57e84b3 on checketts:prometheus-url-parameters into 8d1851c on Unleash:master.

Copy link
Contributor

@chriswk chriswk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good way to reduce cardinality of our request metrics. 👍

@ivarconr ivarconr merged commit f49b508 into Unleash:master Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants