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

Log a warning when instrumenting a cache that is not recording stats #5066

Open
keith-turner opened this issue May 11, 2024 · 2 comments
Open
Labels
enhancement A general enhancement help wanted An issue that a contributor can help us with instrumentation An issue that is related to instrumenting a component module: micrometer-core An issue that is related to our core module
Milestone

Comments

@keith-turner
Copy link

Please describe the feature request.
It would be nice if a warning were logged (or the user was informed in some way) when a cache is instrumented that is not recording stats.

Rationale
For some Cache implementations like Caffeine recording stats is optional. When instrumenting a cache that is not recording stats the meters will constantly report 0 which could be misleading. This is probably not what the user desires.

Additional context

apache/accumulo#4552

@shakuzen shakuzen added enhancement A general enhancement module: micrometer-core An issue that is related to our core module instrumentation An issue that is related to instrumenting a component help wanted An issue that a contributor can help us with and removed waiting-for-triage labels Aug 9, 2024
@shakuzen shakuzen added this to the 1.x milestone Aug 9, 2024
@shakuzen
Copy link
Member

shakuzen commented Aug 9, 2024

That sounds like a good improvement to me. Would you or anyone else be interested in making a pull request for it?

@izeye
Copy link
Contributor

izeye commented Aug 25, 2024

I created #5402 to try to resolve this for the CaffeineCacheMetrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement help wanted An issue that a contributor can help us with instrumentation An issue that is related to instrumenting a component module: micrometer-core An issue that is related to our core module
Projects
None yet
Development

No branches or pull requests

3 participants