class MetricBuilder extends AnyRef
A builder class used to configure settings and metadata for metrics prior to instantiating them. Calling any of the three build methods (counter, gauge, or histogram) will cause the metric to be instantiated in the underlying StatsReceiver.
- Alphabetic
- By Inheritance
- MetricBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
MetricBuilder(keyIndicator: Boolean = false, description: String = "No description provided", units: MetricUnit = Unspecified, role: SourceRole = NoRoleSpecified, verbosity: Verbosity = Verbosity.Default, sourceClass: Option[String] = None, name: Seq[String] = Seq.empty, processPath: Option[String] = None, percentiles: IndexedSeq[Double] = IndexedSeq.empty, statsReceiver: StatsReceiver)
- keyIndicator
indicates whether this metric is crucial to this service (ie, an SLO metric)
- description
human-readable description of a metric's significance
- units
the unit associated with the metrics value (milliseconds, megabytes, requests, etc)
- role
whether the service is playing the part of client or server regarding this metric
- verbosity
see StatsReceiver for details
- sourceClass
the name of the class which generated this metric (ie, com.twitter.finagle.StatsFilter)
- name
the relative metric name which will be appended to the scope of the StatsReceiver prior to long term storage
- processPath
a universal coordinate for the resource
- percentiles
used to indicate buckets for histograms, to be set by the StatsReceiver
- statsReceiver
used for the actual metric creation, set by the StatsReceiver when creating a MetricBuilder
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(other: Any): Boolean
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
counter(name: String*): Counter
Produce a counter as described by the builder inside the underlying StatsReceiver.
Produce a counter as described by the builder inside the underlying StatsReceiver.
- returns
the counter created.
- val description: String
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- MetricBuilder → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
gauge(name: String*)(f: ⇒ Float): Gauge
Produce a gauge as described by the builder inside the underlying StatsReceiver.
Produce a gauge as described by the builder inside the underlying StatsReceiver.
- returns
the gauge created.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- MetricBuilder → AnyRef → Any
-
def
histogram(name: String*): Stat
Produce a histogram as described by the builder inside the underlying StatsReceiver.
Produce a histogram as described by the builder inside the underlying StatsReceiver.
- returns
the histogram created.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keyIndicator: Boolean
- val name: Seq[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val percentiles: IndexedSeq[Double]
- val processPath: Option[String]
- val role: SourceRole
- val sourceClass: Option[String]
- val statsReceiver: StatsReceiver
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- MetricBuilder → AnyRef → Any
- val units: MetricUnit
- val verbosity: Verbosity
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withDescription(desc: String): MetricBuilder
- def withIdentifier(processPath: Option[String]): MetricBuilder
- def withKeyIndicator(isKeyIndicator: Boolean = true): MetricBuilder
- def withName(name: Seq[String]): MetricBuilder
- def withPercentiles(percentiles: IndexedSeq[Double]): MetricBuilder
- def withRole(role: SourceRole): MetricBuilder
- def withSourceClass(sourceClass: Option[String]): MetricBuilder
- def withUnits(units: MetricUnit): MetricBuilder
- def withVerbosity(verbosity: Verbosity): MetricBuilder