Metrics
Each Connector exposes a series of metrics which can be used to monitor its health and statistics.
MetricsAdapter choice
By default, metrics are exposed using Cinnamon (aka Akka Insights, aka Lightbend Telemetry) over Prometheus.
However, it’s possible to use a different Metrics backend by specifying the MetricsAdapter when creating any type of
connector, with:
.withMetricsAdapter(myMetricsAdapter)
The current available options for MetricsAdapter are:
-
CinnamonMetricsAdapter(default): uses Cinnamon/Lightbend Telemetry/Akka Insights -
MicrometerMetricsAdapter: uses Micrometer, for integration with Spring Boot metrics for example
Please note that for technical reasons the metric names differ depending on the type of implementation used. See the table below for more details.
Where metrics are exposed
When using the default MetricsAdapter, the default location where connector metrics are hosted is
localhost:9001. If statistics are not displaying, then ensure that the Lightbend Telemetry agent is running.
For more information check out the Cinnamon Agent Documentation.
When using Micrometer, these will be available as part of Spring Boot Actuator Prometheus.
Connector Metrics Breakdown
Each connector has its own set of metrics in the table below.
Every metric is tagged with the relevant connector’s name.
To distinguish which metrics relate to which connector, use the connector hint in the Prometheus exporter.
| Metric name (Cinnamon) | Metric name (Micrometer) | Type | Description |
|---|---|---|---|
|
|
Counter |
Logs the number of messages sent through a sending connector |
|
|
Counter |
Logs the number of messages received through a receiving connector |
|
|
Counter |
The number of correlation records persisted by the correlation service |
|
|
Counter |
The number of correlation records fetched from the correlation service |
|
|
Histogram/Recorder |
The number of failed correlation lookups from the correlation service |
|
|
Counter |
The number of failed message requests through a sending connector |
|
|
Counter |
The number of failed message receives through a receiving connector |
|
|
Histogram/Recorder |
A complex |
|
The |
Circuit Breaker Metrics
Circuit breaker metrics use MeterRegistry implementations to publish metrics. This can be set at a per-connector level through ResiliencySettings:
ResiliencySettings.builder()
.initialRetryWaitDuration(Duration.ofMillis(10))
.maxAttempts(1)
.resetTimeout(Duration.ofSeconds(1))
.meterRegistry(SIMPLE_METER_REGISTRY)
.build()
Alternatively this can be set through the SendingConnector interface. This allows setting the meterRegistry implementation at an application level.
For example, if we want to set all the sendingConnectors to have the same meterRegistry implementation we can loop through and set them with the API after we have already built the connectors. This allows us to quickly switch implementations without the need to change each connector definition.