Class DcpClientMetrics

java.lang.Object
com.couchbase.client.dcp.metrics.DcpClientMetrics

public class DcpClientMetrics extends Object
  • Constructor Details

  • Method Details

    • incrementReconfigure

      public void incrementReconfigure()
    • incrementAddChannel

      public void incrementAddChannel()
    • incrementRemoveChannel

      public void incrementRemoveChannel()
    • scheduledPollingTasks

      public LongAdder scheduledPollingTasks()
    • channelMetrics

      public DcpChannelMetrics channelMetrics(com.couchbase.client.core.util.HostAndPort address)
    • registerConnectionStatusGauges

      public void registerConnectionStatusGauges(Collection<DcpChannel> channels)
      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.