com.twitter.finagle.stats

StatsReceiver

trait StatsReceiver extends AnyRef

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

Self Type
StatsReceiver
See also

StatsReceivers for a Java-friendly API.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StatsReceiver
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addGauge(name: String*)(f: ⇒ Float): Gauge

    Add the function f as a gauge with the given name.

    Add the function f as a gauge with the given name.

    The returned gauge value is only weakly referenced by the StatsReceiver, and if garbage collected will eventually cease to be a part of this measurement: thus, it needs to be retained by the caller. Or put another way, the measurement is only guaranteed to exist as long as there exists a strong reference to the returned gauge and typically should be stored in a member variable.

    Measurements under the same name are added together.

    See also

    java.lang.ref.WeakReference

    StatsReceiver.provideGauge when there is not a good location to store the returned gauge that can give the desired lifecycle.

  2. abstract def counter(name: String*): Counter

    Get a counter with the given name.

  3. abstract val repr: AnyRef

    Specifies the representative receiver.

    Specifies the representative receiver. This is in order to expose an object we can use for comparison so that global stats are only reported once per receiver.

  4. abstract def stat(name: String*): Stat

    Get a stat with the given name.

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def counter0(name: String): Counter

    Get a counter with the given name.

    Get a counter with the given name.

    This method is a convenience for Java programs, but is no longer needed because StatsReceivers.counter is usable from java.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. def isNull: Boolean

    Accurately indicates if this is a NullStatsReceiver.

    Accurately indicates if this is a NullStatsReceiver. Because equality is not forwarded via scala.Proxy, this is helpful to check for a NullStatsReceiver.

  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def provideGauge(name: String*)(f: ⇒ Float): Unit

    Register a function f as a gauge with the given name that has a lifecycle with no end.

    Register a function f as a gauge with the given name that has a lifecycle with no end.

    This measurement exists in perpetuity.

    Measurements under the same name are added together.

    See also

    StatsReceiver.addGauge if you can properly control the lifecycle of the returned gauge.

  20. def scope(namespace: String): StatsReceiver

    Prepend namespace to the names of the returned StatsReceiver.

    Prepend namespace to the names of the returned StatsReceiver.

    For example:

    statsReceiver.scope("client").counter("adds")
    statsReceiver.scope("client").scope("backend").counter("adds")

    will generate counters named /client/adds and /client/backend/adds.

  21. def scopeSuffix(suffix: String): StatsReceiver

    Prepend a suffix value to the next scope.

    Prepend a suffix value to the next scope.

    For example:

    statsReceiver.scopeSuffix("toto").scope("client").counter("adds")

    will generate a counter named /client/toto/adds.

  22. def stat0(name: String): Stat

    Get a stat with the given name.

    Get a stat with the given name. This method is a convenience for Java programs, but is no longer needed because StatsReceivers.counter is usable from java.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def time[T](name: String*)(f: ⇒ T): T

    Time a given function in milliseconds.

    Time a given function in milliseconds.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  2. def time[T](unit: TimeUnit, name: String*)(f: ⇒ T): T

    Time a given function using the given TimeUnit.

    Time a given function using the given TimeUnit.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  3. def time[T](unit: TimeUnit, stat: Stat)(f: ⇒ T): T

    Time a given function using the given TimeUnit.

    Time a given function using the given TimeUnit.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  4. def timeFuture[T](name: String*)(f: ⇒ Future[T]): Future[T]

    Time a given future in milliseconds.

    Time a given future in milliseconds.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

  5. def timeFuture[T](unit: TimeUnit, name: String*)(f: ⇒ Future[T]): Future[T]

    Time a given future using the given TimeUnit.

    Time a given future using the given TimeUnit.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

  6. def timeFuture[T](unit: TimeUnit, stat: Stat)(f: ⇒ Future[T]): Future[T]

    Time a given future using the given TimeUnit.

    Time a given future using the given TimeUnit.

    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

Inherited from AnyRef

Inherited from Any

Ungrouped