-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Add 'logging' as new metric export type #47442
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
base: main
Are you sure you want to change the base?
Add 'logging' as new metric export type #47442
Conversation
Signed-off-by: Vasily Pelikh <[email protected]>
It might make sense to add auto-configuration for
might be easier to resolve using the |
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 verify back-off when a Clock is absent, but not when LoggingMeterRegistry itself is missing.
Could we add an ApplicationContextRunner test with a FilteredClassLoader(LoggingMeterRegistry.class) to assert that neither LoggingMeterRegistry nor LoggingRegistryConfig is created? That would complement the @ConditionalOnClass(LoggingMeterRegistry.class) path.
Additionally, minor naming nit in LoggingMetricsExportPropertiesConfigAdapterTests: some methods refer to “AggregationTemporality” but assert logInactive(). Consider renaming to reflect logInactive to avoid confusion.
Good suggestion. But if I remember correctly, these endpoints only shows the latest values. In this case, one of the purposes of metrics - comparing values at different times during the application's execution - is lost.
Yep, and I think this behavior what you should expect from a metrics system - to show metric values once in a while. 😀
Honestly, I never had this problem. But surely new configuration options can be added in future.
You mean use logging registry instead of simple if other options are not suitable? |
Oh, thanks for the review, @danish-ali! I will check it out later when I will be around pc. |
Signed-off-by: Vasily Pelikh <[email protected]>
It's useful to see metrics in the console during development, without having to set up an LGTM container or write additional code.