zio.metrics

package zio.metrics

Members list

Packages

package zio.metrics.jvm

Type members

Classlikes

trait Metric[+Type, -In, +Out] extends ZIOAspect[Nothing, Any, Nothing, Any, Nothing, In]

A Metric[In, Out] represents a concurrent metric, which accepts updates of type In, which are aggregated to a stateful value of type Out.

A Metric[In, Out] represents a concurrent metric, which accepts updates of type In, which are aggregated to a stateful value of type Out.

For example, a counter metric would have type Metric[Double, Double], representing the fact that the metric can be updated with doubles (the amount to increment or decrement the counter by), and the state of the counter is a double.

There are five primitive metric types supported by ZIO:

  • Counters
  • Frequencies
  • Gauges
  • Histograms
  • Summaries

The companion object contains constructors for these primitive metrics. All metrics are derived from these primitive metrics.

Attributes

Companion
object
Supertypes
trait ZIOAspect[Nothing, Any, Nothing, Any, Nothing, In]
class Object
trait Matchable
class Any
Self type
Metric[Type, In, Out]
object Metric

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Metric.type
sealed case class MetricKey[+Type]

A MetricKey is a unique key associated with each metric. The key is based on a combination of the metric type, the name and tags associated with the metric, and any other information to describe a a metric, such as the boundaries of a histogram. In this way, it is impossible to ever create different metrics with conflicting keys.

A MetricKey is a unique key associated with each metric. The key is based on a combination of the metric type, the name and tags associated with the metric, and any other information to describe a a metric, such as the boundaries of a histogram. In this way, it is impossible to ever create different metrics with conflicting keys.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
MetricKey[Type]
object MetricKey

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
MetricKey.type
sealed trait MetricKeyType

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Counter.type
object Frequency.type
object Gauge.type
class Histogram
class Summary
object MetricKeyType

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class MetricLabel(key: String, value: String)

A MetricLabel represents a key value pair that allows analyzing metrics at an additional level of granularity. For example if a metric tracks the response time of a service labels could be used to create separate versions that track response times for different clients.

A MetricLabel represents a key value pair that allows analyzing metrics at an additional level of granularity. For example if a metric tracks the response time of a service labels could be used to create separate versions that track response times for different clients.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class MetricPair[Type <: MetricKeyType { type Out = Out0; }, Out0](metricKey: MetricKey[Type], metricState: MetricState[Out0])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MetricPair

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
MetricPair.type
sealed trait MetricState[+Type]

A MetricState describes the state of a metric. The type parameter of a metric state corresponds to the type of the metric key (MetricKeyType). This phantom type parameter is used to tie keys to their expected states.

A MetricState describes the state of a metric. The type parameter of a metric state corresponds to the type of the metric key (MetricKeyType). This phantom type parameter is used to tie keys to their expected states.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Counter
class Frequency
class Gauge
class Histogram
class Summary
object MetricState

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Metrics

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait PollingMetric[-R, +E, +Out]

A PollingMetric[Type, Out] is a combination of a metric and an effect that polls for updates to the metric.

A PollingMetric[Type, Out] is a combination of a metric and an effect that polls for updates to the metric.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Self type
PollingMetric[R, E, Out]
object PollingMetric

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type