Interface StatsLogger

    • Method Detail

      • getOpStatsLogger

        OpStatsLogger getOpStatsLogger​(java.lang.String name)
        Parameters:
        name - Stats Name
        Returns:
        Get the logger for an OpStat described by the name.
      • getThreadScopedOpStatsLogger

        OpStatsLogger getThreadScopedOpStatsLogger​(java.lang.String name)
        Parameters:
        name - Stats Name
        Returns:
        Get the logger for an OpStat described by the name with extra labels for the threadpool/threadname and thread no. Lone threads always have 0 as their thread no.
      • getCounter

        Counter getCounter​(java.lang.String name)
        Parameters:
        name - Stats Name
        Returns:
        Get the logger for a simple stat described by the name
      • getThreadScopedCounter

        Counter getThreadScopedCounter​(java.lang.String name)
        Parameters:
        name - Stats Name
        Returns:
        Get the logger for a simple stat described by the name with extra labels for the threadpool/threadname and thread no. Lone threads always have 0 as their thread no.
      • registerGauge

        <T extends java.lang.Number> void registerGauge​(java.lang.String name,
                                                        Gauge<T> gauge)
        Register given gauge as name name.
        Parameters:
        name - gauge name
        gauge - gauge function
      • unregisterGauge

        <T extends java.lang.Number> void unregisterGauge​(java.lang.String name,
                                                          Gauge<T> gauge)
        Unregister given gauge from name name.
        Parameters:
        name - name of the gauge
        gauge - gauge function
      • scope

        StatsLogger scope​(java.lang.String name)
        Provide the stats logger under scope name.
        Parameters:
        name - scope name.
        Returns:
        stats logger under scope name.
      • scopeLabel

        default StatsLogger scopeLabel​(java.lang.String labelName,
                                       java.lang.String labelValue)
        Provide the stats logger with an attached label.
        Parameters:
        labelName - the name of the label.
        labelValue - the value of the label.
        Returns:
        stats logger under scope name.
      • removeScope

        void removeScope​(java.lang.String name,
                         StatsLogger statsLogger)
        Remove the given statsLogger for scope name. It can be no-op if the underlying stats provider doesn't have the ability to remove scope.
        Parameters:
        name - name of the scope
        statsLogger - the stats logger of this scope.