Observability

pillars.Observability
See theObservability companion object
final case class Observability[F[_]](tracer: Tracer[F], metrics: Meter[F], interceptor: Interceptor[F])

Attributes

Companion
object
Source
Observability.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Exports

Defined exports

Exported from Meter

Constructs a batch callback.

Constructs a batch callback.

Batch callbacks allow a single callback to observe measurements for multiple asynchronous instruments.

The callback will be called when the instruments are being observed.

Attributes

Example
val meter: Meter[F] = ???
val server: F[Unit] = ??? // runs the server
val background: Resource[F, Unit] =
 meter.batchCallback.of(
   meter.observableCounter[Long]("counter").createObserver,
   meter.observableUpDownCounter[Double]("up-down-counter").createObserver,
   meter.observableGauge[Double]("gauge").createObserver
 ) { (counter, upDownCounter, gauge) =>
   counter.record(1L) *> upDownCounter.record(2.0) *> gauge.record(3.0)
 }
background.surround(server) // register batch callback and run the server
Source
Meter.scala