Counter

zio.telemetry.opentelemetry.metrics.Counter
See theCounter companion object
trait Counter[-A] extends Instrument[A]

A Counter 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
trait Instrument[A]
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. MUST be non-negative

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

Inherited methods

def record0(value: A, attributes: Attributes, context: Context): Unit

Attributes

Inherited from:
Instrument