Metric

trait Metric[Inst <: Instrument[Inst, Sett], Sett <: Settings] extends Tagging[Inst]

Describes a property of a system to be measured, and contains all the necessary information to create the actual instrument instances used to measure and record said property. Practically, a Metric can be seen as a group instruments that measure different dimensions (via tags) of the same property of the system.

All instruments belonging to a given metric share the same settings and only differ from each other by the unique combination of tags used to create them.

Companion:
object
trait Tagging[Inst]
class Object
trait Matchable
class Any
class BaseMetric[Inst, Sett, Snap]
trait Counter
trait Gauge
trait Histogram
trait Timer

Value members

Abstract methods

def 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.

def 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.

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.

def settings: Sett

Configuration settings that apply to all instruments of this metric.

Configuration settings that apply to all instruments of this metric.

def withoutTags(): Inst

Returns an instrument without tags for this metric.

Returns an instrument without tags for this metric.

Inherited methods

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.

Inherited from:
Tagging
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.

Inherited from:
Tagging
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.

Inherited from:
Tagging
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.

Inherited from:
Tagging