Metrics and Events

All the Cinnamon instrumentations produce metrics and/or events. Metrics are values like for example the mailbox size for an actor class over a period of time, while events are things that happen at a specific point in time like for example logging an error.

Metrics

Most of the behavior of metrics and how they are reported is configured depending on which backend plugin is selected and which instrumentations are enabled. One exception is the ability to disable metrics from being collected which can be done regardless of which backend plugin is enabled.

Disable metrics

Here is a sample configuration that disables the akka actor sent messages metric:

cinnamon.akka.meta.descriptor.actor.sent-messages.enabled = false

A full list of metrics and events can be found here.

Events

Events are also selected and configured based on the backend plugins and instrumentations. Just like metrics, you can also disable events from being fired in a common way for all backends.

Disable events

Here is a sample configuration that disables the akka actor dead letter event:

cinnamon.akka.meta.descriptor.actor.dead-letter.enabled = false

Rate limit events

Events also support rate limiting, both individually, and default values, as well as a global rate limit that applies to all events combined. Rate limiting is also configured in the same way for all backends.

Here is a sample configuration for changing the default rate limiting, the global rate limiting and also the reference configuration.

Changing Defaults
# event defaults are applied per event
cinnamon.meta.events.rate.default {
  # only every 10:th event will be fired
  every = 10
  # events will fire at-most 10 times every 10 seconds
  at-most = 10
  at-most-every = 10s
}
Changing Global
  # global settings apply to all events combined
  cinnamon.meta.events.rate.global {
  # only every 15:th event will be fired
  every = 15
  # events will fire at-most 10 times every 10 seconds
  at-most = 10
  at-most-every = 10s
}
Reference
cinnamon.meta.events {
  # rate limit events
  rate {
    # event defaults are applied per event
    default {
      # only every n:th event will be fired
      every = 1

      # events will fire at-most times every time period
      at-most = 1
      at-most-every = 0s
    }

    # global settings apply to all events combined
    global {
      # only every n:th event will be fired
      every = 1

      # events will fire at most once every time period
      at-most = 1
      at-most-every = 0s
    }
  }
}
Note

These settings are defined in the reference.conf. You only need to specify any of these settings when you want to override the defaults.

To configure the rate limiting for a specific event, i.e. the akka dead letter event, in a different way than the default, you use the hints mechanism in the event definition configuration to point to a rate limiting configuration section. This means that you can point several different events to the same rate limiting configuration section.

cinnamon.akka.meta.descriptor.actor.dead-letter.hints += "rate:my.rate.limiter"

my.rate.limiter {
  every = 3
  at-most = 15
  at-most-every = 1m
}

A full list of metrics and events can be found here.