Using Prometheus as the metrics backend

Lightbend Telemetry can report metrics to Prometheus new tab using a backend plugin integrated with the Prometheus JVM client new tab.

The following is the core Cinnamon Prometheus dependency that you will need to add to your build tool configuration, together with the HTTP server exporter new tab:

Java
pom.xml
<!-- Cinnamon Prometheus core dependency -->
<dependency>
    <groupId>com.lightbend.cinnamon</groupId>
    <artifactId>cinnamon-prometheus</artifactId>
    <version>${lightbend.cinnamon.version}</version>
</dependency>
<!-- Cinnamon Prometheus HTTP server dependency -->
<dependency>
    <groupId>com.lightbend.cinnamon</groupId>
    <artifactId>cinnamon-prometheus-httpserver</artifactId>
    <version>${lightbend.cinnamon.version}</version>
</dependency>
Scala
build.sbt
libraryDependencies ++= Seq(
  Cinnamon.library.cinnamonPrometheus,
  Cinnamon.library.cinnamonPrometheusHttpServer)

After you have made that alteration, enable the HTTP server exporter using the following configuration:

src/main/resources/telemetry.conf
cinnamon.prometheus {
  exporters += http-server
}

Metrics from Prometheus will now be available at the configured server location. If you are using the defaults, the location is http://localhost:9001/metrics.

See the Full Telemetry documentation new tab for details and references regarding Prometheus configuration.