This module lets you collect metrics from executor service: Thread Pool Executors and Fork Join Pools. To start tracking
a executor service you must register it with the executors module by calling
as shown bellow:
val threadPool = java.util.concurrent.Executors.newFixedThreadPool(10) val registration = Executors.register("sample-thread-pool", threadPool) registration.cancel() // Later on, when shutting down the executor service.
You will get back a
Registration that you can cancel at any moment if you want to stop tracking the executor service.
That is something you should definitely do before shutting down the executor service.
libraryDependencies += "io.kamon" %% "kamon-executors" % "1.0.2"
<dependency> <groupId>io.kamon</groupId> <artifactId>kamon-executors_2.12</artifactId> <version>1.0.2</version> </dependency>
You must start your application with the instrumentation agent for this module to work properly.
Regardless of the type, all executor services will get the following metrics:
Additionally, all executor service metrics will also have the following tags: