Package

com.twitter.finagle

stats

Permalink

package stats

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractStatsReceiver extends StatsReceiver

    Permalink
  2. class BlacklistStatsReceiver extends StatsReceiverProxy

    Permalink

    A blacklisting StatsReceiver.

    A blacklisting StatsReceiver. If the name for a metric is found to be blacklisted, nothing is recorded.

  3. case class BucketAndCount(lowerLimit: Long, upperLimit: Long, count: Int) extends Product with Serializable

    Permalink

    Buckets consist of a lower limit and an upper limit.

    Buckets consist of a lower limit and an upper limit. In histograms, all values that fall inside these limits are counted as the same.

    The lower limit is inclusive and the upper limit is exclusive

    count

    number of data points which landed in that bucket.

  4. class CategorizingExceptionStatsHandler extends ExceptionStatsHandler

    Permalink

    Basic implementation of exception stat recording that allows exceptions to be categorised and optional rollup.

  5. trait Counter extends AnyRef

    Permalink

    A writeable Counter.

    A writeable Counter. Only sums are kept of Counters. An example Counter is "number of requests served".

  6. trait DelegatingStatsReceiver extends AnyRef

    Permalink

    Should be mixed into StatsReceivers that delegate to other StatsReceivers.

  7. trait ExceptionStatsHandler extends AnyRef

    Permalink

    Exception Stats Recorder.

  8. trait Gauge extends AnyRef

    Permalink

    Exposes the value of a function.

    Exposes the value of a function. For example, one could add a gauge for a computed health metric.

  9. trait HistogramDetail extends AnyRef

    Permalink

    Details of a histogram's data points.

  10. class InMemoryStatsReceiver extends StatsReceiver with WithHistogramDetails

    Permalink

    An in-memory implementation of StatsReceiver, which is mostly used for testing.

    An in-memory implementation of StatsReceiver, which is mostly used for testing.

    Note that an InMemoryStatsReceiver does not conflate Seq("a", "b") and Seq("a/b") names no matter how they look when printed.

    val isr = new InMemoryStatsReceiver
    isr.counter("a", "b", "foo")
    isr.counter("a/b", "bar")
    
    isr.print(Console.out) // will print two lines "a/b/foo 0" and "a/b/bar 0"
    
    assert(isr.counters(Seq("a", "b", "foo") == 0)) // ok
    assert(isr.counters(Seq("a", "b", "bar") == 0)) // fail
  11. abstract class NameTranslatingStatsReceiver extends StatsReceiverProxy

    Permalink

    A StatsReceiver receiver proxy that translates all counter, stat, and gauge names according to a translate function.

  12. class NullStatsReceiver extends StatsReceiver

    Permalink

    A no-op StatsReceiver.

    A no-op StatsReceiver. Metrics are not recorded, making this receiver useful in unit tests and as defaults in situations where metrics are not strictly required.

  13. trait ReadableCounter extends Counter

    Permalink

    A variation of Counter that also supports reading of the current value via the apply method.

  14. trait ReadableStat extends Stat

    Permalink

    A variation of Stat that also supports reading of the current time series via the apply method.

  15. class RollupStatsReceiver extends StatsReceiverProxy

    Permalink

    A RollupStatsReceiver reports stats on multiple Counter/Stat/Gauge based on the sequence of names you pass.

    A RollupStatsReceiver reports stats on multiple Counter/Stat/Gauge based on the sequence of names you pass. e.g. counter("errors", "clientErrors", "java_net_ConnectException").incr() will actually increment those three counters: - "/errors" - "/errors/clientErrors" - "/errors/clientErrors/java_net_ConnectException"

  16. trait Stat extends AnyRef

    Permalink

    An append-only collection of time-series data.

    An append-only collection of time-series data. Example Stats are "queue depth" or "query width in a stream of requests".

    Utilities for timing synchronous execution and asynchronous execution are on the companion object (Stat.time(Stat) and Stat.timeFuture(Stat).

  17. trait StatsReceiver extends AnyRef

    Permalink

    An interface for recording metrics.

    An interface for recording metrics. Named Counters, Stats, and Gauges can be accessed through the corresponding methods of this class.

    Verbosity Levels

    Each metric created via a stats receiver has a verbosity level attached to it. Distinguishing verbosity levels for metrics is optional and is up to a concrete implementation. Doing this, however, helps to separate debug metrics (only helpful in troubleshooting) from their operationally-required counterparts (provide a corresponding degree of visibility into a healthy process) thus potentially reducing the observability cost.

    Metrics created w/o an explicitly specified Verbosity level, will use Verbosity.Default. Use VerbosityAdjustingStatsReceiver to adjust this behaviour.

    See also

    StatsReceivers for a Java-friendly API.

  18. trait StatsReceiverProxy extends StatsReceiver with DelegatingStatsReceiver

    Permalink

    A proxy StatsReceiver that delegates all calls to the self stats receiver.

  19. trait StatsReceiverWithCumulativeGauges extends StatsReceiver

    Permalink
  20. final class Verbosity extends AnyRef

    Permalink

    Represent a verbosity level for a given metric.

  21. class VerbosityAdjustingStatsReceiver extends StatsReceiverProxy

    Permalink

    A StatsReceiver that adjusts the passed Verbosity of an underlying stats receiver to a given defaultVerbosity.

  22. trait WithHistogramDetails extends AnyRef

    Permalink

    Allow StatsReceivers to provide snapshots of histogram counts.

    Allow StatsReceivers to provide snapshots of histogram counts. Implementations must expose a map where keys are the name of the stat and values are the contents of the histogram.

Value Members

  1. object AggregateWithHistogramDetails

    Permalink
  2. object BroadcastCounter

    Permalink

    BroadcastCounter is a helper object that create a Counter wrapper around multiple Counters (n).

    BroadcastCounter is a helper object that create a Counter wrapper around multiple Counters (n). For performance reason, we have specialized cases if n == (0, 1, 2, 3 or 4)

  3. object BroadcastStat

    Permalink

    BroadcastStat is a helper object that create a Counter wrapper around multiple Stats (n).

    BroadcastStat is a helper object that create a Counter wrapper around multiple Stats (n). For performance reason, we have specialized cases if n == (0, 1, 2, 3 or 4)

  4. object BroadcastStatsReceiver

    Permalink

    BroadcastStatsReceiver is a helper object that create a StatsReceiver wrapper around multiple StatsReceivers (n).

  5. object DelegatingStatsReceiver

    Permalink
  6. object ExceptionStatsHandler

    Permalink

    API for deciding where request exceptions are reported in stats.

    API for deciding where request exceptions are reported in stats. Typical implementations may report any cancellations or validation errors separately so success rate can from valid non cancelled requests.

    See also

    Null for a no-op handler.

  7. object JStats

    Permalink

    Stat utility methods for ease of use from java.

  8. object NullStatsReceiver extends NullStatsReceiver

    Permalink
  9. object Stat

    Permalink

    Helpers for working with histograms.

    Helpers for working with histograms.

    Java-friendly versions can be found in com.twitter.finagle.stats.JStats.

  10. object StatsReceiver

    Permalink
  11. object StatsReceivers

    Permalink

    StatsReceiver utility methods for ease of use from java.

  12. object Verbosity

    Permalink

Ungrouped