Builder

org.typelevel.otel4s.metrics.ObservableUpDownCounter.Builder
trait Builder[F[_], A]

A builder of ObservableUpDownCounter.

Type parameters

A

the type of the values to record. The type must have an instance of MeasurementValue. scala.Long and scala.Double are supported out of the box.

F

the higher-kinded type of a polymorphic effect

Attributes

Source
ObservableUpDownCounter.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Creates an asynchronous instrument based on an effect that produces a number of measurements.

Creates an asynchronous instrument based on an effect that produces a number of measurements.

The measurement effect will be evaluated when the instrument is being observed.

The measurement effect is expected to abide by the following restrictions:

  • Short-living and (ideally) non-blocking

  • Run in a finite amount of time

  • Safe to call repeatedly, across multiple threads

Value parameters

measurements

effect that produces a number of measurements

Attributes

Source
ObservableUpDownCounter.scala

Creates an observer for this instrument to observe values from a BatchCallback.

Creates an observer for this instrument to observe values from a BatchCallback.

Attributes

Note

The observer must be registered via Meter.batchCallback. Values observed outside registered callbacks are ignored.

Source
ObservableUpDownCounter.scala

Creates an instrument with the given callback, using unit and description (if any).

Creates an instrument with the given callback, using unit and description (if any).

The callback will be called when the instrument is being observed.

The callback is expected to abide by the following restrictions:

  • Short-living and (ideally) non-blocking

  • Run in a finite amount of time

  • Safe to call repeatedly, across multiple threads

Value parameters

cb

the callback which observes measurements when invoked

Attributes

Source
ObservableUpDownCounter.scala
def withDescription(description: String): Builder[F, A]

Sets the description for this instrument.

Sets the description for this instrument.

Value parameters

description

the description

Attributes

See also
Source
ObservableUpDownCounter.scala
def withUnit(unit: String): Builder[F, A]

Sets the unit of measure for this instrument.

Sets the unit of measure for this instrument.

Value parameters

unit

the measurement unit. Must be 63 or fewer ASCII characters.

Attributes

See also
Source
ObservableUpDownCounter.scala