Package com.couchbase.client.dcp.metrics
Class DcpClientMetrics
java.lang.Object
com.couchbase.client.dcp.metrics.DcpClientMetrics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchannelMetrics
(com.couchbase.client.core.util.HostAndPort address) void
void
void
void
registerConnectionStatusGauges
(Collection<DcpChannel> channels) Updates the "connection status" gauge for all channels.
-
Constructor Details
-
DcpClientMetrics
-
-
Method Details
-
incrementReconfigure
public void incrementReconfigure() -
incrementAddChannel
public void incrementAddChannel() -
incrementRemoveChannel
public void incrementRemoveChannel() -
scheduledPollingTasks
-
channelMetrics
-
registerConnectionStatusGauges
Updates the "connection status" gauge for all channels.Micrometer gauges are finicky about only being registered once, which could cause problems if we were to naively register the gauge as part of the channel metrics, since it's possible for a channel to come and go.
A MultiGauge does not suffer from this limitation, so let's use that instead, and overwrite the previous measurements each time there's a connection state change. It's also an easy way to clean up gauges for channels that are no longer part of the cluster.
-