Class TenantMetrics.ZoneDataMetricsRequestContext
java.lang.Object
io.confluent.kafka.multitenant.metrics.TenantMetrics.TenantMetricsContext
io.confluent.kafka.multitenant.metrics.TenantMetrics.MetricsRequestContext
io.confluent.kafka.multitenant.metrics.TenantMetrics.ZoneDataMetricsRequestContext
- All Implemented Interfaces:
org.apache.kafka.server.metrics.MetricsBuilderContext
- Enclosing class:
TenantMetrics
public static class TenantMetrics.ZoneDataMetricsRequestContext
extends TenantMetrics.MetricsRequestContext
Starting first with K2's initial Freight offering and XENI, zone alignment between the client, the Confluent-provided gateway into Confluent Cloud, and the serving broker is almost always possible, so it's important to track how exactly the zones of these three layers align.
When relevant (e.g. when K2 with XENI is being used), this metrics request context is used
for augmenting all TenantMetrics request/response sensors with zone data tags. It adds
a tag for the zone ID of each of the aforementioned three layers (client zone ID, gateway
(envoy) zone ID, and broker zone ID).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionZoneDataMetricsRequestContext(io.confluent.kafka.multitenant.MultiTenantPrincipal principal, String clientId, org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, boolean isFetchFromFollowerEnabled, Optional<String> clientZoneId, Optional<String> gatewayZoneId, Optional<String> brokerZoneId, String networkType) -
Method Summary
Modifier and TypeMethodDescriptionwithClientZoneId(String clientZoneId) Returns a new context with the client zone ID replaced, keeping all other fields unchanged.Methods inherited from class TenantMetrics.MetricsRequestContext
addAdditionalTags, apiKey, clientId, isFetchFromFollowerEnabled, isVersionDeprecated, networkType, sensorSuffix, setTenantConfig, tenantConfigMethods inherited from class TenantMetrics.TenantMetricsContext
metricsGroup, principal
-
Constructor Details
-
ZoneDataMetricsRequestContext
public ZoneDataMetricsRequestContext(io.confluent.kafka.multitenant.MultiTenantPrincipal principal, String clientId, org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, boolean isFetchFromFollowerEnabled, Optional<String> clientZoneId, Optional<String> gatewayZoneId, Optional<String> brokerZoneId, String networkType)
-
-
Method Details
-
withClientZoneId
Returns a new context with the client zone ID replaced, keeping all other fields unchanged. Used to override the client ID-parsed zone with the authoritative FFF rack ID (per KIP-392). -
metricTags
- Specified by:
metricTagsin interfaceorg.apache.kafka.server.metrics.MetricsBuilderContext- Overrides:
metricTagsin classTenantMetrics.MetricsRequestContext
-