The Caffeine instrumentation adds tracing for Caffeine and Caffeine-backed synchronous clients.
Metrics are gathered using the
KamonStatsCounter, which needs to be added manually.
When building a cache, add it by calling the
Caffeine.newBuilder() .recordStats(() -> new KamonStatsCounter("cache_name")) .build();
In case you are not using the Kamon Bundle, add the dependency below to your build.
libraryDependencies += "io.kamon" %% "kamon-caffeine" % "2.5.8"
<dependency> <groupId>io.kamon</groupId> <artifactId>kamon-caffeine_2.13</artifactId> <version>2.5.8</version> </dependency>
You must start your application with the instrumentation agent for this module to work properly.
Your first step towards Kamon APM is conversation with Kamon's lead developer, Ivan. He'll help you figure out if Kamon APM is the right tool for your team and personally guide you through the initial setup and next steps. Here he is: