This ticket is to migrate the existing implementation of the Prometheus metric client to ZIO 2.0. The metric client will call the MetricClient.unsafeSnapshot method from ZIO 2.0 here to obtain a snapshot of all metrics in the application at the request of the user. The functionality to start up and shut down the client should be encompassed in a ZIOApp that can be composed with other ZIOApp values using the <> operator on ZIOApp.
object MetricClient {
/**
* Unsafely captures a snapshot of all metrics recorded by the application.
*/
final def unsafeSnapshot: Map[MetricKey, MetricState] =
???
}
This ticket is to migrate the existing implementation of the Prometheus metric client to ZIO 2.0. The metric client will call the
MetricClient.unsafeSnapshot
method from ZIO 2.0 here to obtain a snapshot of all metrics in the application at the request of the user. The functionality to start up and shut down the client should be encompassed in aZIOApp
that can be composed with otherZIOApp
values using the<>
operator onZIOApp
.