I am using micrometer for prometheus metrics, howe...
# ktor
j
I am using micrometer for prometheus metrics, however due to unique ids and the like in my paths (
/users/123/posts
) the tags won't match eachother and explode into a bunch of unique metrics. Does anyone know of a way to strip/replace the path parameters from the path somehow? Just doing call.request.path() returns a string with the unique ids. I believe I didn't have this problem in spring, and express also had a way of returning the path with placeholders
m
I'm also using micrometer + prometheus and I don't have that problem - the metrics have routes instead of paths
how do you configure the
MicrometerMetrics
plugin?
it already has a
route
tag by default and it should have something like
/users/{userId}/posts
as a value based on your example - no need to explicitly set a path
j
What version of micrometer are you using?
m
1.14.3, ktor 3