BaseMetric

abstract class BaseMetric[Inst <: Instrument[Inst, Sett], Sett <: Settings, Snap](val name: String, val description: String, val settings: Sett, instrumentBuilder: (Inst, Sett) => Snap, scheduler: Option[ScheduledExecutorService]) extends Metric[Inst, Sett]
trait Metric[Inst, Sett]
trait Tagging[Inst]
class Object
trait Matchable
class Any

Value members

Abstract methods

protected def buildMetricSnapshot(metric: Metric[Inst, Sett], instruments: Seq[Snapshot[Snap]]): MetricSnapshot[Sett, Snap]
protected def instrumentType: Type

Used by the Status API only

Used by the Status API only

Concrete methods

def bindScheduler(scheduler: ScheduledExecutorService): Unit
override def remove(tags: TagSet): Boolean

Removes an instrument with the provided tags from a metric, if it exists. Returns true if the instrument existed and was removed or false if no instrument was found with the provided tags.

Removes an instrument with the provided tags from a metric, if it exists. Returns true if the instrument existed and was removed or false if no instrument was found with the provided tags.

Definition Classes
def schedule(instrument: Inst, action: Runnable, interval: Duration): Any
def shutdown(): Unit
override def snapshot(resetState: Boolean): MetricSnapshot[Sett, Snap]

Creates a snapshot for a metric. If the resetState flag is set to true, the internal state of all instruments associated with this metric will be reset, if applicable.

Creates a snapshot for a metric. If the resetState flag is set to true, the internal state of all instruments associated with this metric will be reset, if applicable.

Definition Classes
Snapshotting
def status(): Metric
override def withTag(key: String, value: String): Inst

Returns an instrument with one additional tag defined by the provided key and value pair.

Returns an instrument with one additional tag defined by the provided key and value pair.

Definition Classes
override def withTag(key: String, value: Boolean): Inst

Returns an instrument with one additional tag defined by the provided key and value pair.

Returns an instrument with one additional tag defined by the provided key and value pair.

Definition Classes
override def withTag(key: String, value: Long): Inst

Returns an instrument with one additional tag defined by the provided key and value pair.

Returns an instrument with one additional tag defined by the provided key and value pair.

Definition Classes
override def withTags(tags: TagSet): Inst

Returns an instrument with additional tags from the provided TagSet.

Returns an instrument with additional tags from the provided TagSet.

Definition Classes
override def withoutTags(): Inst

Returns an instrument without tags for this metric.

Returns an instrument without tags for this metric.

Definition Classes

Concrete fields

val description: String

Short, concise and human readable explanation of what is being measured by a metric.

Short, concise and human readable explanation of what is being measured by a metric.

val name: String

A unique identifier for this metric. Metric names typically will be namespaced, meaning that their name has a structure similar to that of a package name that describes what component is generating the metric. For example, metrics related to the JVM have the "jvm." prefix while metrics related to Akka Actors have the "akka.actor." prefix.

A unique identifier for this metric. Metric names typically will be namespaced, meaning that their name has a structure similar to that of a package name that describes what component is generating the metric. For example, metrics related to the JVM have the "jvm." prefix while metrics related to Akka Actors have the "akka.actor." prefix.

val settings: Sett

Configuration settings that apply to all instruments of this metric.

Configuration settings that apply to all instruments of this metric.