Metric

zio.metrics.Metric$
See theMetric companion trait
object Metric

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Metric.type

Members list

Concise view

Type members

Classlikes

implicit class CounterSyntax[In](counter: Metric[Counter, In, Any])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
implicit class GaugeSyntax[In](gauge: Metric[Gauge, In, Any])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
implicit class InvariantSyntax[Type, In, Out](self: Metric[Type, In, Out])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
object runtime

Core metrics that are updated by the ZIO runtime system.

Core metrics that are updated by the ZIO runtime system.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
runtime.type

Types

type Counter[-In] = Metric[Counter, In, Counter]
type Gauge[-In] = Metric[Gauge, In, Gauge]
type Summary[-In] = Metric[Summary, In, Summary]

Value members

Concrete methods

def counter(name: String): Counter[Long]

A counter, which can be incremented by longs.

A counter, which can be incremented by longs.

Attributes

A counter, which can be incremented by doubles.

A counter, which can be incremented by doubles.

Attributes

A counter, which can be incremented by integers.

A counter, which can be incremented by integers.

Attributes

A string histogram metric, which keeps track of the counts of different strings.

A string histogram metric, which keeps track of the counts of different strings.

Attributes

def fromMetricKey[Type <: MetricKeyType](key: MetricKey[Type]): Metric[Type, In, Out]

Creates a metric from a metric key. This is the primary constructor for zio.Metric.

Creates a metric from a metric key. This is the primary constructor for zio.Metric.

Attributes

def gauge(name: String): Gauge[Double]

A gauge, which can be set to a value.

A gauge, which can be set to a value.

Attributes

def histogram(name: String, boundaries: Boundaries): Histogram[Double]

A numeric histogram metric, which keeps track of the count of numbers that fall in bins with the specified boundaries.

A numeric histogram metric, which keeps track of the count of numbers that fall in bins with the specified boundaries.

Attributes

def succeed[Out](out: => Out): Metric[Unit, Any, Out]

Creates a metric that ignores input and produces constant output.

Creates a metric that ignores input and produces constant output.

Attributes

def summary(name: String, maxAge: Duration, maxSize: Int, error: Double, quantiles: Chunk[Double]): Summary[Double]

A summary metric.

A summary metric.

Attributes

def summaryInstant(name: String, maxAge: Duration, maxSize: Int, error: Double, quantiles: Chunk[Double]): Summary[(Double, Instant)]

Creates a timer metric, based on a histogram, which keeps track of durations in the specified unit of time (milliseconds, seconds, etc.). The unit of time will automatically be added to the metric as a tag ("time_unit: milliseconds").

Creates a timer metric, based on a histogram, which keeps track of durations in the specified unit of time (milliseconds, seconds, etc.). The unit of time will automatically be added to the metric as a tag ("time_unit: milliseconds").

Attributes

def timer(name: String, chronoUnit: ChronoUnit, boundaries: Chunk[Double]): Metric[Histogram, Duration, Histogram]

Implicits

Implicits

final implicit def CounterSyntax[In](counter: Metric[Counter, In, Any]): CounterSyntax[In]
final implicit def GaugeSyntax[In](gauge: Metric[Gauge, In, Any]): GaugeSyntax[In]
final implicit def InvariantSyntax[Type, In, Out](self: Metric[Type, In, Out]): InvariantSyntax[Type, In, Out]