Class Metrics
java.lang.Object
io.kroxylicious.proxy.internal.util.Metrics
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindNettyAllocatorMetrics(io.netty.buffer.ByteBufAllocator alloc) static voidbindNettyEventExecutorMetrics(io.netty.channel.EventLoopGroup... eventLoopGroups) static voidclear()static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Timer> clientToProxyBackpressureTimer(String clusterName, Integer nodeId) static AtomicIntegerstatic io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> clientToProxyConnectionCounter(String clusterName, Integer nodeId) static ActivationTokenstatic io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> clientToProxyDisconnectsCounter(String clusterName, Integer nodeId, String cause) Creates a counter for tracking client to proxy disconnections by cause.static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> clientToProxyErrorCounter(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> clientToProxyMessageCounterProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.DistributionSummary> clientToProxyMessageSizeDistributionProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> proxyToClientMessageCounterProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.DistributionSummary> proxyToClientMessageSizeDistributionProvider(String clusterName, Integer nodeId) static AtomicIntegerstatic io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> proxyToServerConnectionCounter(String clusterName, Integer nodeId) static ActivationTokenstatic io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> proxyToServerErrorCounter(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> proxyToServerMessageCounterProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.DistributionSummary> proxyToServerMessageSizeDistributionProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.CounterreconfigureClustersAffectedCounter(String operation, String outcome) Counter of per-virtual-cluster operations applied during reconfigures, tagged byoperation(add,remove,modify) andoutcome(success,failure).static io.micrometer.core.instrument.CounterreconfigureCounter(String outcome) Counter ofreconfigure()invocations that got past pre-flight validation, tagged byoutcome(success,partial_failure,catastrophic).static io.micrometer.core.instrument.TimerTimer for end-to-end reconfigure duration.static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Timer> serverToProxyBackpressureTimer(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> serverToProxyMessageCounterProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.DistributionSummary> serverToProxyMessageSizeDistributionProvider(String clusterName, Integer nodeId) static io.micrometer.core.instrument.CountertaggedCounter(String counterName, List<io.micrometer.core.instrument.Tag> tags) static List<io.micrometer.core.instrument.Tag> static List<io.micrometer.core.instrument.Tag> static List<io.micrometer.core.instrument.Tag> static voidupdateVirtualClusterState(String clusterName, String state) Updates thekroxylicious_virtual_cluster_statestate-set gauge so the series forstatereads 1 and every other state forclusterNamereads 0.static voidversionInfoMetric(VersionInfo versionInfo) Exposes a build info metric describing Kroxylicious version etc.static io.micrometer.core.instrument.TimervirtualClusterStateDurationTimer(String clusterName, String state) Timer for the time a virtual cluster spent in a given lifecycle state (recorded when it leaves that state).static io.micrometer.core.instrument.CountervirtualClusterTransitionsCounter(String clusterName, String from, String to) Counter of virtual cluster lifecycle state transitions, tagged byfromandtostate.
-
Field Details
-
VIRTUAL_CLUSTER_LABEL
- See Also:
-
NODE_ID_LABEL
- See Also:
-
API_KEY_LABEL
- See Also:
-
API_VERSION_LABEL
- See Also:
-
DECODED_LABEL
- See Also:
-
OUTCOME_LABEL
- See Also:
-
OPERATION_LABEL
- See Also:
-
STATE_LABEL
- See Also:
-
FROM_STATE_LABEL
- See Also:
-
TO_STATE_LABEL
- See Also:
-
-
Method Details
-
clientToProxyMessageCounterProvider
-
proxyToClientMessageSizeDistributionProvider
-
proxyToClientMessageCounterProvider
-
clientToProxyMessageSizeDistributionProvider
-
serverToProxyMessageSizeDistributionProvider
-
proxyToServerMessageSizeDistributionProvider
-
serverToProxyMessageCounterProvider
-
proxyToServerMessageCounterProvider
-
clientToProxyConnectionCounter
-
clientToProxyDisconnectsCounter
public static io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> clientToProxyDisconnectsCounter(String clusterName, @Nullable Integer nodeId, String cause) Creates a counter for tracking client to proxy disconnections by cause.- Parameters:
clusterName- the virtual cluster namenodeId- the node ID (can be null for bootstrap connections)cause- the disconnect cause label (e.g., "idle_timeout", "client_closed", "server_closed")- Returns:
- a meter provider for the disconnect counter
-
clientToProxyErrorCounter
-
proxyToServerConnectionCounter
-
proxyToServerErrorCounter
-
serverToProxyBackpressureTimer
-
clientToProxyBackpressureTimer
-
clientToProxyConnectionToken
-
clientToProxyConnectionCounter
-
proxyToServerConnectionToken
-
proxyToServerConnectionCounter
-
taggedCounter
-
tags
-
tags
-
tags
-
versionInfoMetric
Exposes a build info metric describing Kroxylicious version etc.- Parameters:
versionInfo- version info
-
reconfigureCounter
Counter ofreconfigure()invocations that got past pre-flight validation, tagged byoutcome(success,partial_failure,catastrophic). Pre-attempt rejections (concurrent / static-section change) are deliberately not counted here — they surface as distinct exceptions and would otherwise pollute failure alerting. -
reconfigureDurationTimer
public static io.micrometer.core.instrument.Timer reconfigureDurationTimer()Timer for end-to-end reconfigure duration. Percentile histogram is published because reconfigures are rare events, so the extra bucket series are cheap and make the distribution queryable in Prometheus. -
reconfigureClustersAffectedCounter
public static io.micrometer.core.instrument.Counter reconfigureClustersAffectedCounter(String operation, String outcome) Counter of per-virtual-cluster operations applied during reconfigures, tagged byoperation(add,remove,modify) andoutcome(success,failure). -
updateVirtualClusterState
Updates thekroxylicious_virtual_cluster_statestate-set gauge so the series forstatereads 1 and every other state forclusterNamereads 0.The first call for a cluster registers a gauge for every
VirtualClusterLifecycleStateat once. This must only be invoked once the proxy is past startup (i.e. on a lifecycle transition, not at lifecycle construction) -
virtualClusterStateDurationTimer
public static io.micrometer.core.instrument.Timer virtualClusterStateDurationTimer(String clusterName, String state) Timer for the time a virtual cluster spent in a given lifecycle state (recorded when it leaves that state). Percentile histogram is published — lifecycle transitions are rare. -
virtualClusterTransitionsCounter
public static io.micrometer.core.instrument.Counter virtualClusterTransitionsCounter(String clusterName, String from, String to) Counter of virtual cluster lifecycle state transitions, tagged byfromandtostate. -
clear
public static void clear() -
bindNettyEventExecutorMetrics
public static void bindNettyEventExecutorMetrics(io.netty.channel.EventLoopGroup... eventLoopGroups) -
bindNettyAllocatorMetrics
public static void bindNettyAllocatorMetrics(io.netty.buffer.ByteBufAllocator alloc)
-