Akka

To monitor your Akka application, use Cinnamon to send metrics from your application to the local OpsClarity agent. Once you have Cinnamon set up, say with the sbt plugin, you can include the cinnamonOpsClarity and cinnamonAkka libraries with configurations as shown below. All Akka metrics will then flow into OpsClarity when your application is run.

requirements

build.sbt

lazy val myApplication = project in file(".") enablePlugins Cinnamon
cinnamon in run := true

libraryDependencies ++= Seq(
  Cinnamon.library.cinnamonOpsClarity,
  Cinnamon.library.cinnamonAkka
)

application.conf

Below is our recommended configuration for both cinnamon.opsclarity and cinnamon.akka sections.

#
# optionally override cinnamonOpsClarity default settings
# example, send mean and sample aggregations every 30 seconds
#
cinnamon.opsclarity.dogstatsd {
  frequency = 30s
  report {
    histogram = ["mean"]
    meter = ["samples"]
  }
}

#
# required specification for actor metrics
# example, get all /user/ actors, aggregated by class:
#
cinnamon.akka.actors {
  "/user/*" {
    report-by = class
  }
}

metrics

Metric Name Units Metric Description
Running actors  Count the number of running actors (of an actor class or group).
Mailbox Size  Count statistics for actor mailbox sizes.
Stash size   count statistics for actor stash sizes
Mailbox time  time statistics for the time that messages are in the mailbox
Processed messages    rate the number of messages that actors have processed in the selected time frame
Processing time  time statistics for the processing time of actors.
Sent messages  rate  statistics for the number of sent messages per actor.

 

remote actor metrics

Metric Name Units Metric Description
Sent messages  rate  statistics for the number sent remote messages.
Sent message size  bytes statistics for remote sent message sizes.
Serialization time  time statistics for the time that serialization takes.
Received messages  rate statistics for the number received remote messages.
Received message size  bytes statistics for remote received message sizes.
Deserialization time  time statistics for the time that deserialization takes.
Phi accrual value  gauge statistics for the Phi accrual failure detector
Phi accrual threshold value  gauge the configured Phi accrual threshold value.