Open ebett opened 1 year ago
I have a springboot application that runs with datadog agent lib. We can see all app metrics but wanted to see cache statistics in datadog.
I'm using EH-cache 3, I enabled statistics like this example:
@Bean public javax.cache.CacheManager ehCacheManager() { CacheConfiguration<String, String> myCacheConfig = CacheConfigurationBuilder .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder.heap(10)) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofHours(24))) .build(); org.ehcache.config.Configuration configuration = ConfigurationBuilder.newConfigurationBuilder() .withCache("myCache", myCacheConfig) .build(); EhcacheCachingProvider provider = (EhcacheCachingProvider) Caching.getCachingProvider( "org.ehcache.jsr107.EhcacheCachingProvider"); javax.cache.CacheManager cacheManager = provider.getCacheManager( provider.getDefaultURI(), configuration); cacheManager.enableStatistics("myCache", true); return cacheManager; }
I see statistics metrics from jconsole localy.
Now I need to expose statistics jmx metrics to DataDog. Do I need to add some specific bean? @ljacomet @chrisdennis
I have a springboot application that runs with datadog agent lib. We can see all app metrics but wanted to see cache statistics in datadog.
I'm using EH-cache 3, I enabled statistics like this example:
I see statistics metrics from jconsole localy.
Now I need to expose statistics jmx metrics to DataDog. Do I need to add some specific bean? @ljacomet @chrisdennis