Class ThreadScopedDataSketchesStatsLogger

  • All Implemented Interfaces:
    OpStatsLogger

    public class ThreadScopedDataSketchesStatsLogger
    extends java.lang.Object
    implements OpStatsLogger
    OpStatsLogger implementation that lazily registers OpStatsLoggers per thread with added labels for the threadpool/thresd name and thread no.
    • Constructor Detail

      • ThreadScopedDataSketchesStatsLogger

        public ThreadScopedDataSketchesStatsLogger​(PrometheusMetricsProvider provider,
                                                   ScopeContext scopeContext,
                                                   java.util.Map<java.lang.String,​java.lang.String> labels)
    • Method Detail

      • registerFailedEvent

        public void registerFailedEvent​(long eventLatency,
                                        java.util.concurrent.TimeUnit unit)
        Description copied from interface: OpStatsLogger
        Increment the failed op counter with the given eventLatency.
        Specified by:
        registerFailedEvent in interface OpStatsLogger
        Parameters:
        eventLatency - The event latency
      • registerSuccessfulEvent

        public void registerSuccessfulEvent​(long eventLatency,
                                            java.util.concurrent.TimeUnit unit)
        Description copied from interface: OpStatsLogger
        An operation succeeded with the given eventLatency. Update stats to reflect the same
        Specified by:
        registerSuccessfulEvent in interface OpStatsLogger
        Parameters:
        eventLatency - The event latency
      • registerFailedValue

        public void registerFailedValue​(long value)
        Description copied from interface: OpStatsLogger
        An operation with the given value failed.
        Specified by:
        registerFailedValue in interface OpStatsLogger
      • toOpStatsData

        public OpStatsData toOpStatsData()
        Specified by:
        toOpStatsData in interface OpStatsLogger
        Returns:
        Returns an OpStatsData object with necessary values. We need this function to support JMX exports. This should be deprecated sometime in the near future. populated.
      • clear

        public void clear()
        Description copied from interface: OpStatsLogger
        Clear stats for this operation.
        Specified by:
        clear in interface OpStatsLogger