Get ready to instrument your services
in a few simple steps

It should take you just a couple minutes to setup Kamon in your service

Step 1. Install Kamon in your Application

Plain Application
These steps work with any application where you are in control of the "main" method, like most Akka, Akka HTTP and Spring Boot services
Play Framework Apps
Follow these steps if you are instrumenting a Play Framework service
Manual Instrumentation
Start here if you just want to use the Kamon APIs to manually instruemnt a service
Start by adding the Kamon Bundle dependency to your build. The bundle contains all available instrumentation in one single jar, so just copy this into your build:

libraryDependencies += "io.kamon" %% "kamon-bundle" % "2.0.1"

// If you want to be able to run yor app with instrumentation
// from SBT, add this to your project/plugins.sbt file:
addSbtPlugin("io.kamon" % "sbt-kanela-runner" % "2.0.2")



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-bundle_2.12</artifactId>
      <version>2.0.1</version>
    </dependency>


implementation 'io.kamon:kamon-bundle_2.12:2.0.1'

then, make sure that you initialize Kamon as the very first thing in your application by calling the Kamon.init() method.
object Start extends App {
  Kamon.init()

  // Your application code goes here
}
fun main(args: Array<String>) {
  Kamon.init()

  // Your application code goes here
}
  public static void main(String[] args) {
    Kamon.init();

    // Your application code goes here
  }
That's it. This will take care of starting all modules and enabling instrumentation. Your are good to go now!
Start by adding the Kamon Bundle dependency to your build. The bundle contains all available instrumentation in one single jar, so just copy this into your build:
libraryDependencies += "io.kamon" %% "kamon-bundle" % "2.0.1"
then, let's make sure that instrumentation will be working as expected when running on development mode using the SBT Kanela Runner plugin:
addSbtPlugin("io.kamon" % "sbt-kanela-runner-play-2.7" % "2.0.2")
and finally, enable the JavaAgent plugin in your project to ensure that instrumentation will be working when running on production mode:
lazy val root = (project in file(".")).enablePlugins(PlayScala, JavaAgent)
That's it. This will take care of starting all modules and enabling instrumentation. Your are good to go now!
Start by adding the Kamon Core dependency to your build. The core library only contains the metrics, tracing and context propagation API. To get it, just copy this into your build:

libraryDependencies += "io.kamon" %% "kamon-core" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-core_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-core_2.12:2.0.0'

then, even though it is not really necessary, it might be really helpful to install the Status Page module and use it to inspect what metrics are being exposed:

libraryDependencies += "io.kamon" %% "kamon-status-page" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-status-page_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-status-page_2.12:2.0.0'

and as last step, make sure that you initialize Kamon as the very first thing in your application by calling the Kamon.init() method.
object Start extends App {
  Kamon.init()

  // Your application code goes here
}
fun main(args: Array<String>) {
  Kamon.init()

  // Your application code goes here
}
  public static void main(String[] args) {
    Kamon.init();

    // Your application code goes here
  }
That's it. This will take care of starting all modules and enabling instrumentation. Your are good to go now!

Step 2. Verify the Installation

Once your instrumented service is started, you should be able to visit localhost:5266 and find Kamon's Status Page. If you confirm that instrumentation is active, everything should be ready working properly. It should look something like this:
Kamon Status Page

Step 3. Send out your data

All reporter modules are just one extra dependency jar in your project, Kamon will automatically pick them up from the classpath and start them for you. You can add as many as you need.
Kamon APM
Analyze your metrics and trace data with a solution specially crafted for Kamon
Prometheus
Expose a scrape endpoint for Prometheus to collect metrics data
Zipkin
Send Spans to Zipkin or any compatible receiver over the HTTP API
InfluxDB
Send metrics to directly to InfluxDB using the line protocol over HTTP
Datadog
Send metrics and spans to Datadog using their agent or the public HTTP API
Just add the Kamon APM reporter dependency to your build:

libraryDependencies += "io.kamon" %% "kamon-apm-reporter" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-apm-reporter_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-apm-reporter_2.12:2.0.0'

and make sure that you include your service name and API key in your application.conf file:
                
                  kamon.environment {
                    service = "My Service Name"
                  }

                  kamon.apm {
                    api-key = "abcdefghijklmnopqrstuvwxyz"
                  }
                
              
You are done! Next time your app starts, Kamon will automatically pick up the reporter and start sending data to Kamon APM.
Don't have an account yet?
SIGN UP NOW
Just add the Prometheus Reporter dependency to your build:

libraryDependencies += "io.kamon" %% "kamon-prometheus" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-prometheus_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-prometheus_2.12:2.0.0'

and you might want to customize the host and port where the embedded server listens in your application.conf file:
                
                  kamon.prometheus {
                    embedded-server {
                      hostname = 0.0.0.0
                      port = 9095
                    }
                  }
                
              
You are done! Next time your app starts, Kamon will automatically pick up the reporter and expose the scrape endpoint at localhost:9095 (or wherever you configured it).
Just add the Zipkin Reporter dependency to your build:

libraryDependencies += "io.kamon" %% "kamon-zipkin" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-zipkin_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-zipkin_2.12:2.0.0'

and you might want to configure the host and port where Zipkin is listening in your application.conf file:
                
                  kamon.zipkin {
                    hostname = localhost
                    port = 9411
                  }
                
              
You are done! Next time your app starts, Kamon will automatically pick up the reporter and send Spans to Zipkin.
Just add the InfluxDB Reporter dependency to your build:

libraryDependencies += "io.kamon" %% "kamon-influxdb" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-influxdb_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-influxdb_2.12:2.0.0'

and you might want to configure the host, port and database to which data is sent in your application.conf file:
                
                  kamon.influxdb {
                    hostname = localhost
                    port = 8086
                    database = "mydb"
                  }
                
              
You are done! Next time your app starts, Kamon will automatically pick up the reporter and send metrics to InfluxDB.
Just add the Datadog Reporter dependency to your build:

libraryDependencies += "io.kamon" %% "kamon-datadog" % "2.0.0"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-datadog_2.12</artifactId>
      <version>2.0.0</version>
    </dependency>


implementation 'io.kamon:kamon-datadog_2.12:2.0.0'

and you might want to configure the host, port and database to which data is sent in your application.conf file:
                
                  kamon.datadog {
                    agent {
                      hostname = localhost
                      port = 9411
                    }

                  }
                
              
You are done! Next time your app starts, Kamon will automatically pick up the reporter and send metrics and spans to the Datadog Agent.

Having Trouble?

If something went wrong during your setup, you have some feature request or in general just want to hang out with the folks and talk about the experience, head over to our Gitter channel and say it all.

Next Steps

If you want to dig deeper into what metrics are exposed by the instrumention, how to create your own business metrics or configure reporters, head over to the documentation to learn more.

You can monitor up to three microservices
for free with Kamon APM