Skip to main content

Metrics

Armeria's xDS module exposes metrics for monitoring control plane communication, resource state, and load balancer behavior. All metrics are prefixed with armeria.xds by default.

Configuration

Metrics are configured when creating the XdsBootstrap:

XdsBootstrap xdsBootstrap = XdsBootstrap.builder(bootstrap)
.meterRegistry(meterRegistry)
.meterIdPrefix(new MeterIdPrefix("my.custom.prefix"))
.build();

Control plane metrics

These metrics track xDS stream lifecycle and communication with the control plane.

All metrics in this group are tagged with:

  • type — the config source type (e.g. ads, api_config_source)
  • name — the gRPC cluster name
  • xdsType — the resource type (e.g. listener, route, cluster, endpoint, secret, ads)
MetricTypeDescription
configsource.stream.activeGaugeWhether the stream is currently active (1 or 0)
configsource.stream.openedCounterNumber of times the xDS stream was opened
configsource.stream.completedCounterNumber of normal stream closures
configsource.stream.errorCounterNumber of stream errors
configsource.stream.requestCounterDiscovery requests sent
configsource.stream.responseCounterDiscovery responses received
configsource.resource.parse.successCounterResources successfully parsed
configsource.resource.parse.rejectedCounterResources rejected due to parse errors

Resource node metrics

These metrics track the state of individual xDS resources loaded by the XdsBootstrap. They are created per resource when a subscription is established and removed when the last subscriber unsubscribes.

All metrics in this group are tagged with:

  • name — the resource name (e.g. listener name, cluster name)
  • type — the resource type (e.g. listener, cluster, cluster_load_assignment)
MetricTypeDescription
resource.node.revisionGaugeLatest revision of the loaded resource
resource.node.errorCounterErrors encountered when updating this resource
resource.node.missingCounterTimes this resource was reported as missing

Load balancer metrics

These metrics track endpoint selection, health, and locality distribution. They are created dynamically per cluster and updated as the load balancer state changes.

Resource metrics

These metrics track the loaded resources used by the load balancer.

Cluster-level metrics

Tagged with cluster (the cluster name).

MetricTypeDescription
lb.resource.updated.revisionGaugeLatest cluster resource revision
lb.resource.updated.countCounterNumber of cluster resource updates
lb.endpoints.updated.revisionGaugeLatest endpoint snapshot revision
lb.endpoints.updated.countCounterNumber of endpoint updates
lb.state.updated.revisionGaugeLatest load balancer state revision
lb.state.updated.countCounterNumber of load balancer state updates
lb.state.rejected.revisionGaugeRevision of last rejected state
lb.state.rejected.countCounterNumber of rejected load balancer states
lb.state.subsetsGaugeNumber of endpoint subsets

Priority-level metrics

Tagged with cluster and priority (integer, 0 is highest).

MetricTypeDescription
lb.state.load.healthyGaugeHealthy endpoint load at this priority
lb.state.load.degradedGaugeDegraded endpoint load at this priority
lb.state.panicGaugeWhether panic mode is active (1 or 0)

Locality-level metrics

Tagged with cluster, priority, region, zone, and sub_zone.

MetricTypeDescription
lb.membership.totalGaugeTotal endpoints in this locality
lb.membership.healthyGaugeHealthy endpoints in this locality
lb.membership.degradedGaugeDegraded endpoints in this locality
lb.locality.weightGaugeWeight assigned to this locality

Zone-aware routing metrics

Tagged with cluster and priority.

MetricTypeDescription
lb.zar.local.percentageGaugePercentage of traffic routed to the local zone
lb.zar.residual.percentageGaugeResidual capacity percentage per locality (tagged with region, zone, sub_zone)

Selection metrics

These metrics track endpoint selection outcomes at request time.

Tagged with cluster, priority, region, zone, sub_zone, and result (hit, miss, no_endpoints, no_host_source).

MetricTypeDescription
lb.selectCounterEndpoint selection outcomes
lb.select.subsetCounterSubset selection outcomes (tagged with subset instead of locality)

File config source metrics

These metrics track file-based config source operations.

Tagged with type (path) and name (file path).

MetricTypeDescription
configsource.file.loadedCounterFiles successfully loaded from disk
configsource.file.errorCounterFile parse errors

Like Armeria?
Star us ⭐️

×