Constant K8S_SERVICE_ENDPOINT_COUNT
pub const K8S_SERVICE_ENDPOINT_COUNT: &'static str;opentelemetry and semconv_experimental only.Expand description
§Description
Number of endpoints for a service by condition and address type.
§Notes
This metric is derived from the Kubernetes EndpointSlice API. It reports the number of network endpoints backing a Service, broken down by their condition and address type.
In dual-stack or multi-protocol clusters, separate counts are reported for each address family (IPv4, IPv6, FQDN).
When the optional zone attribute is enabled, counts are further broken down by availability zone for zone-aware monitoring.
An endpoint may be reported under multiple conditions simultaneously (e.g., both serving and terminating during a graceful shutdown).
See K8s EndpointConditions for more details.
The conditions represent:
ready: Endpoints capable of receiving new connections.serving: Endpoints currently handling traffic.terminating: Endpoints that are being phased out but may still be handling existing connections.
For Services with publishNotReadyAddresses enabled (common for headless StatefulSets),
this metric will include endpoints that are published despite not being ready.
The k8s.service.publish_not_ready_addresses resource attribute indicates this setting
§Metadata
| Instrument: | gauge |
| Unit: | {endpoint} |
| Status: | Development |
§Attributes
| Name | Requirement |
|---|---|
crate::attribute::K8S_SERVICE_ENDPOINT_ADDRESS_TYPE | Required |
crate::attribute::K8S_SERVICE_ENDPOINT_CONDITION | Required |
crate::attribute::K8S_SERVICE_ENDPOINT_ZONE | Recommended |