Akka HTTP

Lightbend Telemetry is capable of capturing data for the following Akka HTTP related features.

Cinnamon Akka HTTP module dependency

After adding the Cinnamon Agent as described in the setup, make sure that you add the Cinnamon Akka HTTP module dependency to your build file:

sbt
libraryDependencies += Cinnamon.library.cinnamonAkkaHttp
Maven
<dependency>
  <groupId>com.lightbend.cinnamon</groupId>
  <artifactId>cinnamon-akka-http_2.11</artifactId>
  <version>2.5.2</version>
</dependency>
Gradle
dependencies {
  compile group: 'com.lightbend.cinnamon', name: 'cinnamon-akka-http_2.11', version: '2.5.2'
}

Akka HTTP server metrics

The following metrics are recorded for instrumented Akka HTTP servers, type of metric in parentheses:

  • Connections (rate) — the rate of connections per server.

  • Requests (rate) — the rate of requests per server.

  • Responses (rate) — the rate of responses per server.

  • Responses 2xx (rate) — the rate of responses with 200-299 status codes per server.

  • Responses 3xx (rate) — the rate of responses with 300-399 status codes per server.

  • Responses 4xx (rate) — the rate of responses with 400-499 status codes per server.

  • Responses 5xx (rate) — the rate of responses with 500-599 status codes per server.

  • Response time (recorder) — the time for responses per server.

  • Response time 2xx (recorder) — the time for responses with 200-299 status codes per server.

  • Response time 3xx (recorder) — the time for responses with 300-399 status codes per server.

  • Response time 4xx (recorder) — the time for responses with 400-499 status codes per server.

  • Response time 5xx (recorder) — the time for responses with 500-599 status codes per server.

Note: Server metrics are created automatically when the Cinnamon Akka HTTP module dependency is added. It is possible to turn server metrics off via configuration.

Akka HTTP server endpoint metrics

The following metrics are recorded for configured endpoints.

  • Endpoint responses (rate) — the rate of responses per endpoint.

  • Endpoint response time (recorder) — the time for responses per endpoint.

Note: By default, no metrics are created for endpoints. Configuration is used to instruct Cinnamon what endpoints to create metrics for.

Akka HTTP client metrics

The following metrics are recorded for instrumented Akka HTTP clients, type of metric in parentheses:

Client pool connection metrics

  • Connections (counter) — the number of connections used in a pool.

Client metrics

  • Requests (rate) — the rate of requests from a client to a service.

  • Service response time (recorder) — the time for responses from a service.

Akka HTTP request tracing

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

SLF4J MDC propagation is also supported for Akka HTTP. This can be used to attach correlation IDs to requests. See MDC propagation through Akka HTTP headers.

Detailed information

For specific information of how to configure Akka HTTP see: