Micrometer HTTP server request custom metrics #29739
Unanswered
AndreasPetersen
asked this question in
Q&A
Replies: 1 comment
-
/cc @ebullient, @jmartisk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to add custom metrics to the HTTP server request metrics produced by
VertxHttpServerMetrics
? I know it's possible to add common tags, but the tag needs to read something from the request, specifically a claim in a provided JWT.It seems Vertx has a functionality where, given a request, return a list of tags to be added (https://vertx.io/docs/vertx-micrometer-metrics/java/#_advanced_usage). This is exactly what I want to be able to do.
Since the HTTP client filter is a JAXRS filter, I can easily make a request scoped bean, add my information to that, and then using a MeterFilter inject that request scoped bean to add my tag. But the
VertxHttpServerMetrics
does not have an active request context, so that is not possible.Vertx.currentContext()
also returns null in a MeterFilter that is called for metrics produced byVertxHttpServerMetrics
.Beta Was this translation helpful? Give feedback.
All reactions