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

Superfluous metrics are being created from SmallRye internal classes #3468

Closed
jmartisk opened this issue Aug 9, 2019 · 0 comments · Fixed by #3469
Closed

Superfluous metrics are being created from SmallRye internal classes #3468

jmartisk opened this issue Aug 9, 2019 · 0 comments · Fixed by #3469
Labels
kind/bug Something isn't working
Milestone

Comments

@jmartisk
Copy link
Contributor

jmartisk commented Aug 9, 2019

Classes in io.smallrye.metrics.interceptors package are annotated in a way that when scanned as application classes, some metrics will be created out of them, but these are internal classes and are not meant to be scanned for metric annotations. This means we register some metrics unnecessarily, which hinders performance and makes the export contain superfluous metrics whose values will always be 0. An excerpt from such bloated OpenMetrics export:

# TYPE application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_total counter
application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_total 0.0
# TYPE application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_rate_per_second gauge
application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_rate_per_second 0.0
# TYPE application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_one_min_rate_per_second gauge
application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_one_min_rate_per_second 0.0
# TYPE application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_five_min_rate_per_second gauge
application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_five_min_rate_per_second 0.0
# TYPE application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_fifteen_min_rate_per_second gauge
application_io_smallrye_metrics_interceptors_MeteredInterceptor_meteredMethod_fifteen_min_rate_per_second 0.0

This happens for every application that has MP Metrics enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants