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

Bind cache metrics from Spring's CacheManager #262

Closed
jkschneider opened this issue Dec 2, 2017 · 4 comments
Closed

Bind cache metrics from Spring's CacheManager #262

jkschneider opened this issue Dec 2, 2017 · 4 comments
Labels
spring-boot change Change is needed in Spring Boot for this issue

Comments

@jkschneider
Copy link
Contributor

See spring-projects/spring-boot#11221 (comment)

@jkschneider jkschneider modified the milestones: 1.0.0-rc.6, 1.0.0 Dec 2, 2017
@jkschneider
Copy link
Contributor Author

The plan is to add an event listener somewhere in or around CacheManager to detect when a new cache has been added to the manager. From there, we can use Cache#getNativeCache() to retrieve the underlying cache and bind the correct MeterBinder.

@jkschneider jkschneider added the spring-boot change Change is needed in Spring Boot for this issue label Dec 9, 2017
@jkschneider
Copy link
Contributor Author

We won't be able to accomplish this in Boot 1.5.x and prior.

@snicoll
Copy link
Contributor

snicoll commented Jan 3, 2018

@jkschneider unfortunately, I think we have to let this one go. javax.cache.CacheManager has no event support for a cache being added which is a blocker on its own. I am not sure the other implementations are any easier in that area.

In the meantime, I've added auto-configuration support for caches with a service that allows you to bind the caches that are created programmatically. That doesn't work for caches created on the fly, which is quite annoying.

@jkschneider jkschneider removed this from the 1.0.0 milestone Jan 3, 2018
@jkschneider
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring-boot change Change is needed in Spring Boot for this issue
Projects
None yet
Development

No branches or pull requests

2 participants