UpDownCounter

zio.telemetry.opentelemetry.metrics.UpDownCounter
See theUpDownCounter companion object
trait UpDownCounter[-A]

A UpDownCounter instrument that records values of type A

Type parameters

A

according to the specification, it can be either scala.Long or scala.Double type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def add(value: A, attributes: Attributes)(implicit trace: Trace): UIO[Unit]

Records a value.

Records a value.

It uses the context taken from the zio.telemetry.opentelemetry.context.ContextStorage to associate with this measurement.

Value parameters

attributes

set of attributes to associate with the value

value

increment amount. May be positive, negative or zero

Attributes

def dec(attributes: Attributes)(implicit trace: Trace): UIO[Unit]

Decrements a counter by one.

Decrements a counter by one.

It uses the context taken from the zio.telemetry.opentelemetry.context.ContextStorage to associate with this measurement.

Value parameters

attributes

set of attributes to associate with the value

Attributes

def inc(attributes: Attributes)(implicit trace: Trace): UIO[Unit]

Increments a counter by one.

Increments a counter by one.

It uses the context taken from the zio.telemetry.opentelemetry.context.ContextStorage to associate with this measurement.

Value parameters

attributes

set of attributes to associate with the value

Attributes