Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package internal
    Definition Classes
    zio
  • package metrics
    Definition Classes
    zio
  • package jvm
  • Metric
  • MetricKey
  • MetricKeyType
  • MetricLabel
  • MetricPair
  • MetricState
  • Metrics
  • PollingMetric
  • package stm
    Definition Classes
    zio
  • package stream
    Definition Classes
    zio
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.Clock.nanoTime
    
    object MyTest extends ZIOSpecDefault {
      def spec = suite("clock")(
        test("time is non-zero") {
          for {
            time <- Live.live(nanoTime)
          } yield assertTrue(time >= 0L)
        }
      )
    }
    Definition Classes
    zio
p

zio

metrics

package metrics

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package jvm

Type Members

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

  2. sealed case class MetricKey[+Type] extends Product with Serializable

    A MetricKey is a unique key associated with each metric.

    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.

  3. sealed trait MetricKeyType extends AnyRef
  4. final case class MetricLabel(key: String, value: String) extends Product with Serializable

    A MetricLabel represents a key value pair that allows analyzing metrics at an additional level of granularity.

    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.

  5. final case class MetricPair[Type <: MetricKeyType { type Out = Out0 }, Out0](metricKey: MetricKey[Type], metricState: MetricState[Out0]) extends Product with Serializable
  6. sealed trait MetricState[+Type] extends AnyRef

    A MetricState describes the state of a metric.

    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.

  7. final case class Metrics extends Product with Serializable
  8. trait PollingMetric[-R, +E, +Out] extends AnyRef

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

Value Members

  1. object Metric
  2. object MetricKey extends Serializable
  3. object MetricKeyType
  4. object MetricPair extends Serializable
  5. object MetricState
  6. object PollingMetric

Ungrouped