As of version 1.4 Lightbend’s Lagom framework is based on Play 2.6, and has the same support for HTTP client and server metrics as Play. In addition Lagom microservices contains built-in circuit breakers that can be instrumented with Lightbend Telemetry.

Note: Lightbend Telemetry will not collect any Akka or Play metrics in Lagom development mode, e.g. when using runAll. The reason for this is that runAll does not fork the JVM when running and a forked JVM is something the Cinnamon agent needs to be able to instrument the Akka code.

Cinnamon Lagom module dependency

Add the Cinnamon Lagom dependency to your build file:

libraryDependencies += Cinnamon.library.cinnamonLagom
dependencies {
  compile group: 'com.lightbend.cinnamon', name: 'cinnamon-lagom_2.11', version: '2.8.2'

Please note that you also need to add a Backend Plugin, e.g. Coda Hale Metrics or OverOps.


To wire up Lagom circuit breakers telemetry in your application you must add the following line to the configuration file:

lagom.spi.circuit-breaker-metrics-class = "cinnamon.lagom.CircuitBreakerInstrumentation"

This instructs Lagom to provide data to Lightbend Telemetry rather than the default behavior.

The information gathered include:

  • State of circuit breaker — closed, open, half-open

  • Latency

  • Throughput

  • Success and failure counts

Note: For more information about configuring other metrics see Actor Configuration and HTTP Configuration.

Lagom circuit breakers

It is important to have an understanding of the circuit breakers in Lagom in order to interpret the data that is gathered. In Lagom each client talking to another service uses a circuit breaker. This basically means that the circuit breaker is on the client instead of the server (in a traditional sense). This means that if your code calls a service directly there will not be any information gathered about this call. Currently only service to service calls are instrumented. See the Lagom documentation for more information on service clients and circuit breakers.

The state of a circuit breaker is one of:

State Interpretation Data Representation
open something is wrong 1
half-open things are going from bad to good 2
closed everything is fine 3

The Data Representation in the above table is the number associated with a certain state, i.e. this is what comes out of Lightbend Telemetry to any reporter listening to the data.

Lagom request tracing

Request tracing is supported through the Cinnamon OpenTracing integration. See Lagom configuration for OpenTracing.