Need guidance with production monitoring?
Book FREE office hours and we'll help you out
Not sure how to approach production monitoring? Book FREE office hours and we'll help you out
Instrumentation/Supported Frameworks

Caffeine Instrumentation #

Since 2.2.2

Overview #

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 recordStats method:

Caffeine.newBuilder()
        .recordStats(() -> new KamonStatsCounter("cache_name"))
        .build();

Manual Installation #

In case you are not using the Kamon Bundle, add the dependency below to your build.


libraryDependencies += "io.kamon" %% "kamon-caffeine" % "2.5.9"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-caffeine_2.13</artifactId>
      <version>2.5.9</version>
    </dependency>


implementation 'io.kamon:kamon-caffeine_2.13:2.5.9'

You must start your application with the instrumentation agent for this module to work properly.

On this article
Kamon APM Logo
Monitor and fix issues in production without being an expert
Learn about APM
Try Kamon APM I know how Kamon APM can help with monitoring. Don't show this again.