ExemplarLabelledTimerSyntax

prometheus4cats.Timer$.ExemplarLabelledTimerSyntax
implicit class ExemplarLabelledTimerSyntax[F[_], A](timer: Aux[F, A, [F[_], A, B] =>> Histogram[F, A, B]])(implicit ev: Unit =:!= A) extends LabelledTimerSyntax[F, A]

Attributes

Source
Timer.scala
Graph
Supertypes
class LabelledTimerSyntax[F, A]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def recordTimeWithExemplar(duration: FiniteDuration, labels: A)(implicit F: FlatMap[F], exemplar: Exemplar[F]): F[Unit]

Attributes

Source
Timer.scala
def recordTimeWithExemplar(duration: FiniteDuration, labels: A, exemplar: Option[Labels]): F[Unit]

Attributes

Source
Timer.scala
final def time[B](fb: F[B], labels: A)(recordExemplar: (FiniteDuration, B, A) => Boolean)(implicit F: MonadThrow[F], clock: Clock[F], exemplar: Exemplar[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock.

Time an operation using an instance of cats.effect.kernel.Clock.

The resulting metrics depend on the underlying implementation. See Timer.fromHistogram and Timer.fromGauge for more details.

Value parameters

fb

operation to be timed

labels

labels to add to the underlying metric

Attributes

Source
Timer.scala
final def timeAttemptWithExemplar[B](fb: F[B])(labelsSuccess: B => A, labelsError: PartialFunction[Throwable, A], recordExemplarSuccess: (FiniteDuration, B, A) => Boolean, recordExemplarFailure: (FiniteDuration, Throwable, A) => Boolean)(implicit F: MonadThrow[F], clock: Clock[F], exemplar: Exemplar[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Value parameters

fb

operation to be timed

labelsError

partial function to convert an exception raised on unsuccessful operation of fb. If the exception does not match the provided scala.PartialFunction then no value will be recorded.

labelsSuccess

function to convert the successful result of fb to labels

Attributes

Source
Timer.scala
final def timeAttemptWithExemplar[B](fb: F[B])(labelsSuccess: B => A, labelsError: PartialFunction[Throwable, A], recordExemplarSuccess: (FiniteDuration, B, A) => Option[Labels], recordExemplarFailure: (FiniteDuration, Throwable, A) => Option[Labels])(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Value parameters

fb

operation to be timed

labelsError

partial function to convert an exception raised on unsuccessful operation of fb. If the exception does not match the provided scala.PartialFunction then no value will be recorded.

labelsSuccess

function to convert the successful result of fb to labels

Attributes

Source
Timer.scala
final def timeWithComputedLabels[B](fb: F[B])(labels: B => A, recordExemplar: (FiniteDuration, B, A) => Boolean)(implicit F: MonadThrow[F], clock: Clock[F], exemplar: Exemplar[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.

Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.

Value parameters

fb

operation to be timed

labels

function to convert the result of fb to labels

Attributes

Source
Timer.scala
final def timeWithComputedLabelsExemplar[B](fb: F[B])(labels: B => A, recordExemplar: (FiniteDuration, B, A) => Option[Labels])(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Attributes

Source
Timer.scala
final def timeWithExemplar[B](fb: F[B], labels: A)(recordExemplar: (FiniteDuration, B, A) => Option[Labels])(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Attributes

Source
Timer.scala

Inherited methods

final def recordTime(duration: FiniteDuration, labels: A): F[Unit]

Attributes

Inherited from:
LabelledTimerSyntax
Source
Timer.scala
final def time[B](fb: F[B], labels: A)(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock.

Time an operation using an instance of cats.effect.kernel.Clock.

The resulting metrics depend on the underlying implementation. See Timer.fromHistogram and Timer.fromGauge for more details.

Value parameters

fb

operation to be timed

labels

labels to add to the underlying metric

Attributes

Inherited from:
LabelledTimerSyntax
Source
Timer.scala
final def timeAttempt[B](fb: F[B])(labelsSuccess: B => A, labelsError: PartialFunction[Throwable, A])(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.

Value parameters

fb

operation to be timed

labelsError

partial function to convert an exception raised on unsuccessful operation of fb. If the exception does not match the provided scala.PartialFunction then no value will be recorded.

labelsSuccess

function to convert the successful result of fb to labels

Attributes

Inherited from:
LabelledTimerSyntax
Source
Timer.scala
final def timeWithComputedLabels[B](fb: F[B])(labels: B => A)(implicit F: MonadThrow[F], clock: Clock[F]): F[B]

Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.

Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.

Value parameters

fb

operation to be timed

labels

function to convert the result of fb to labels

Attributes

Inherited from:
LabelledTimerSyntax
Source
Timer.scala