Instance Constructors
-
new
MetricsStatsReceiver()
-
new
MetricsStatsReceiver(registry: Metrics)
-
new
MetricsStatsReceiver(registry: Metrics, sink: Sink)
-
new
MetricsStatsReceiver(registry: Metrics, sink: Sink, histogramFactory: (String) ⇒ HistogramInterface)
Value Members
-
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
final
def
==(arg0: Any): Boolean
-
def
addGauge(name: String*)(f: ⇒ Float): Gauge
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
counter(names: String*): Counter
-
def
counter0(name: String): Counter
-
def
deregisterGauge(names: Seq[String]): Unit
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
numUnderlying(name: String*): Int
-
def
provideGauge(name: String*)(f: ⇒ Float): Unit
-
def
registerGauge(names: Seq[String], f: ⇒ Float): Unit
-
def
registerLargeGaugeLinter(rules: Rules): Unit
-
val
registry: Metrics
-
-
def
scope(namespace: String): StatsReceiver
-
def
scopeSuffix(suffix: String): StatsReceiver
-
def
stat(names: String*): Stat
-
def
stat0(name: String): Stat
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Deprecated Value Members
-
def
time[T](name: String*)(f: ⇒ T): T
-
def
time[T](unit: TimeUnit, name: String*)(f: ⇒ T): T
-
def
time[T](unit: TimeUnit, stat: Stat)(f: ⇒ T): T
-
def
timeFuture[T](name: String*)(f: ⇒ Future[T]): Future[T]
-
def
timeFuture[T](unit: TimeUnit, name: String*)(f: ⇒ Future[T]): Future[T]
-
def
timeFuture[T](unit: TimeUnit, stat: Stat)(f: ⇒ Future[T]): Future[T]
This implementation of StatsReceiver uses the com.twitter.common.metrics library under the hood.
Note: Histogram uses com.twitter.common.stats.WindowedApproxHistogram under the hood. It is (by default) configured to store events in a 80 seconds moving window, reporting metrics on the first 60 seconds. It means that when you add a value, you need to wait at most 20 seconds before this value will be aggregated in the exported metrics.