Add Telemetry

This section describes how to set up Lightbend Telemetry to take advantage of Lightbend Console’s built in monitors. The main steps include:

  1. Verify Lightbend credentials and add them to the project
  2. Add the Telemetry plugin and enable Prometheus metrics


Lightbend Telemetry requires commercial credentials. You should have a ~/.lightbend/commercial.credentials file with the following contents (if necessary, log into to obtain your username and password):

realm = Bintray
host =
user = <your username>
password = <your password>

In the Akka example’s project directory, create a lightbend.sbt file with the following contents:

credentials += Credentials(Path.userHome / ".lightbend" / "commercial.credentials")
resolvers += "com-mvn" at ""
resolvers += Resolver.url("com-ivy",

Enable Telemetry and Prometheus metrics

To enable Telemetry and Prometheus, edit the following files:

First, open project/plugins.sbt and add the Telemetry sbt-cinnamon plugin:

addSbtPlugin("com.lightbend.cinnamon" % "sbt-cinnamon" % "2.9.3")
resolvers += Resolver.url("lightbend-commercial", url(""))(Resolver.ivyStylePatterns)

Next, add the following configuration to src/main/resources/application.conf:

cinnamon {
    application = "akka-cluster-example"

    // The following lines are specific to the tutorial example app.
    // Configuration details are at
    akka {
        actors {
            "/user/*" {
            report-by = class

    // Enable the prometheus exporter which will be scraped by Console.
    // Configuration details are at
    prometheus {
        exporters += http-server
        http-server {
            // Set this to listen on all interfaces, so it will listen on the container's external interface.
            host = ""
            port = 9091
    // Log to stdout for debugging purposes.
    chmetrics {
        reporters += "console-reporter"

Change exposed ports configuration in build.sbt to include port 9091 that will be used to export Prometheus metrics:

dockerExposedPorts ++= Seq(2552, 8080, 8558, 9091)

Now add this at the end of build.sbt file to enable Cinnamon plugin and add library dependencies:

// Enable Lightbend Telemetry `Cinnamon` plugin.

// Group Cinnamon library dependencies.
lazy val cinnamonDependencies = Seq(

libraryDependencies ++= cinnamonDependencies

Finally, ensure the metric port is exposed. This should already be done for you if you copied the akka-cluster-example.yaml. This should be in the deployment spec:

  - name: metrics
    containerPort: 9091

And this in the service spec:

  - name: metrics
    port: 9091
    targetPort: 9091