Configure Kamon
Configure Kamon for Metrics Data Platform
Configure Kamon for Metrics Data Platform
Last updated 23 August, 2019
Kamon is a monitoring toolkit for applications running on the JVM. In this guide, you will learn how to configure it for Metrics Data Platform.
Kamon is a monitoring toolkit for applications running on the JVM.
It gives you Metrics, Tracing and Context Propagation APIs without locking you to any specific vendor.
All Kamon APIs are completely decoupled from the protocol that can be used to report data, be it StatsD, Prometheus, Zipkin, Jaeger or any other supported reporter. With Kamon you instrument your application once and report anywhere you want.
Kamon provides you a simple way to create :
Add the kamon dependencies to your build:
Example for SBT :
libraryDependencies += "io.kamon" %% "kamon-core" % "1.1.0"
// Optional Dependencies
libraryDependencies += "io.kamon" %% "kamon-prometheus" % "1.0.0"
for Gradle :
dependencies {
compile 'io.kamon:kamon-core_2.12:1.1.0'
compile 'io.kamon:kamon-prometheus_2.12:1.0.0'
}
or for Maven :
<dependencies>
<dependency>
<groupId>io.kamon</groupId>
<artifactId>kamon-core_2.12</artifactId>
<version>1.1.0</version>
</dependency>
<!-- Optional Dependencies -->
<dependency>
<groupId>io.kamon</groupId>
<artifactId>kamon-prometheus_2.12</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
val myHistogram = Kamon.histogram("my.histogram")
val myCounter = Kamon.counter("my.counter")
val myTaggedCounter = Kamon.counter("my.tagged.counter").refine("env" -> "test")
myHistogram.record(42)
myHistogram.record(50)
myCounter.increment()
myTaggedCounter.increment()
Just add a reporter like this :
Kamon.addReporter(new PrometheusReporter())
Go to the documentation to get started with this library.
N’hésitez pas à nous proposer des suggestions d’amélioration afin de faire évoluer cette documentation.
Images, contenu, structure… N’hésitez pas à nous dire pourquoi afin de la faire évoluer ensemble !
Vos demandes d’assistance ne seront pas traitées par ce formulaire. Pour cela, utilisez le formulaire "Créer un ticket" .
Merci beaucoup pour votre aide ! Vos retours seront étudiés au plus vite par nos équipes..
Accedez à votre espace communautaire. Posez des questions, recherchez des informations, publiez du contenu et interagissez avec d’autres membres d'OVHcloud Community.
Echanger sur OVHcloud Community