-
Notifications
You must be signed in to change notification settings - Fork 0
Enable reactor netty metrics #124
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
Conversation
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
|
||
import java.util.function.Function; | ||
|
||
// As discussed here https://stackoverflow.com/questions/66028195/spring-webflux-actuator-netty-thread-metrics, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I read in this, I think we should add either a template for the URI or disable the metrics that we don't use.
* It is strongly recommended to provide template-like form for the URIs. Without a conversion to a template-like form,
* each distinct URI leads to the creation of a distinct tag, which takes a lot of memory for the metrics.
from their doc.
See: https://quarkus.io/guides/telemetry-micrometer#define-tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can see all the metrics it generates here: http://localhost:9000/actuator/prometheus
if you navigate a bit in the app, it generates high cardinality metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use something like:
https://gist.github.com/antoinebhs/8907cc2f9492ce84904d020b2d800977
to only store the metrics that we really use see documentation here: https://docs.micrometer.io/micrometer/reference/concepts/meter-filters.html
It works fine on my deployment, it only adds the two metrics (that are counter so no high cardinality issue/need to template etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
import java.util.function.Function; | ||
|
||
// As discussed here https://stackoverflow.com/questions/66028195/spring-webflux-actuator-netty-thread-metrics, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the link, just explain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments improvements?
src/main/java/org/gridsuite/gateway/NettyMetricsConfiguration.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
|
As mentioned here spring-webflux-actuator-netty-thread-metrics, the metrics exposed by react-netty are not enabled by default in spring boot. To enable them, we add a custom bean