-
Notifications
You must be signed in to change notification settings - Fork 44
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
Express routes like /a/* result in prometheus route /:0/* for request /a/a #114
Comments
This is caused by this code block supporting nest.js. In express, the value of I'd love to fix this, but I'm struggling because I don't really understand the intent of this mentioned code block. If I remove it, no existing tests fail. I found the commit which introduced it, but not much detail to explain it. Any chance somebody would provide a sample input/output case to explain why this block matters? |
I'm playing around with Nest.js scenarios attempting to understand this code block. I can reproduce similar oddities in Nest.js routes. For example, in
I'm unclear why it would ever be desirable to have user-controlled inputs alter the monitoring route. If I can't find any, there are none captured in tests, and nobody can indicate why this is useful - can I propose a PR which removes this code block? |
@kennsippell , i wasn't involved too much in the development of this package from the beginning, but i can tell you that the reason we alter the routes is that we use the request path as a prom label and we must ensure that the every label we define has low cardinality. which is something we can't guaranty unless we replace the url params that are input that we can't control with constant values. hence, we replace the value with having labels with high cardinality that are not bound might cause our app or prometheus to get to OOM. |
Given this express route:
Here is a test that fails:
Here are some inputs for the get() value and current prometheus route.
/wildcard/*
is expected for all inputs./wildcard/something
/wildcard/*
/wildcard/wild
/:0card/*
/wildcard/wildcard
/:0/*
The text was updated successfully, but these errors were encountered: