This document summarizes the various details regarding to monitoring Amaru. As a pre-requisite, it’s important to note that Amaru leverages OpenTelemetry to emit traces & metrics. A compatible observability backend such as Jaeger, Grafana Tempo and/or Prometheus is therefore needed to collect and visualise telemetry.
We provide example configurations using different compositions of tools:
A target is a ::-separated path of identifiers such as amaru::ledger::state. One can filter by providing either a full target, or a sub-path prefix. For example, the target amaru::ledger will match the following:
amaru::ledger::state
amaru::ledger::state::forward
amaru::ledger::store
But it will not match any of the following:
amaru::sync
amaru::consensus
e.g. AMARU_LOG="amaru::ledger::state::forward=info" will filter out targetamaru::ledger::state::forward with level bellow info.
Refer to the tables below for the list of available targets.
It is also possible to filter events by severity: error, warn, info, debug, trace, off. Severity can be specified either globally (in which case it applies to all events) or for a specific target by specifying the severity after the target using =. For example, amaru::ledger::state=error will filter out any events below the error severity for the amaru::ledger::state target.
Refer to the tables below for an overview of the various severities.
A span name can be used as a filter too. Note that any spanor event inside this span will be considered, including those not matching the initial target (e.g. pallas events could match).
For example amaru[find_intersection]=trace will filter all spans and events with the name find_intersection plus all children of this event.
Filters can be provided as a sequence of ,-separated values. Right-most filters take precedence. A usual pattern is to first define a global filter and override it with specific target. For example, error,amaru::ledger::store=debug will exclude any event below the error severity except those targetting amaru::ledger::store which will show up to the debug severity.
Amaru provides a few options to configure OpenTelemetry:
--amaru-service-name <STRING> (environment variable AMARU_SERVICE_NAME): Sets the service.name key used to identify metrics and traces. This is useful when a single OTLP service stack collects telemetry from several Amaru instances
--otlp_span_url <STRING> (environment variable AMARU_OTLP_SPAN_URL): Sets the endpoint used to send spans, defaults to http://localhost:4317--otlp_metrics_url <STRING> (environment variable AMARU_OTLP_METRICS_URL): Sets the endpoint used to send metrics, defaults to http://localhost:4318/v1/metrics