WithCallbacks

class WithCallbacks[F[_], A, A0](quantiles: Seq[QuantileDefinition], maxAgeValue: FiniteDuration, ageBucketsValue: AgeBuckets, makeSummary: (Seq[QuantileDefinition], FiniteDuration, AgeBuckets) => Resource[F, Summary[F, A]], makeSummaryCallback: F[A0] => Resource[F, Unit], makeLabelledSummary: (Seq[QuantileDefinition], FiniteDuration, AgeBuckets) => LabelledMetricPartiallyApplied[F, A, Labelled], makeLabelledSummaryCallback: LabelledCallbackPartiallyApplied[F, A0]) extends WithCallbacks[F, A, A0, [F[_], A] =>> Summary[F, A], [F[_], A, B] =>> Labelled[F, A, B]] with Base[F, A]
trait Base[F, A]
class WithCallbacks[F, A, A0, [F[_], A] =>> Summary[F, A], [F[_], A, B] =>> Labelled[F, A, B]]
trait CallbackStep[F, A0]
class MetricDsl[F, A, [F[_], A] =>> Summary[F, A], [F[_], A, B] =>> Labelled[F, A, B]]
class Object
trait Matchable
class Any

Value members

Concrete methods

override def maxAge(age: FiniteDuration): AgeBucketsStep[F, A]
Definition Classes
Source:
SummaryDsl.scala
override def quantile(quantile: Quantile, error: AllowedError): SummaryDsl[F, A]
Definition Classes
Source:
SummaryDsl.scala

Inherited methods

override def build: Resource[F, M[F, A]]

Builds the metric

Builds the metric

Definition Classes
MetricDsl -> BuildStep
Inherited from:
MetricDsl
Source:
package.scala
def callback(callback: F[A0]): BuildStep[F, Unit]
Inherited from:
CallbackStep
Source:
package.scala
def contramapCallback[B](f: B => A0)(implicit F: Functor[F]): CallbackStep[F, B]
Inherited from:
CallbackStep
Source:
package.scala
override def label[B]: WithCallbacks[F, A, A0, B, L]

Sets the first label of the metric. Requires either a Show instance for the label type, or a method converting the label value to a String.

Sets the first label of the metric. Requires either a Show instance for the label type, or a method converting the label value to a String.

Definition Classes
Inherited from:
WithCallbacks
Source:
package.scala
override def labels[B, N <: Nat](labelNames: Sized[IndexedSeq[Name], N])(f: B => Sized[IndexedSeq[String], N]): WithCallbacks[F, A, A0, B, N, L]

Creates a metric whose label sizes are checked at compile time. Takes a sized collection of label name and a function converting some label object B to a sized collection of strings.

Creates a metric whose label sizes are checked at compile time. Takes a sized collection of label name and a function converting some label object B to a sized collection of strings.

This is useful where a single type B translates to multiple labels. Once invoked, this cannot be used with the singular .label syntax.

Type parameters:
B

type to convert into labels

N

size of the label collection

Value parameters:
f

function to convert B in to a sized collection of label values

labelNames

sized collection of labels names

Definition Classes
Inherited from:
WithCallbacks
Source:
package.scala
def map[B](f: Summary[F, A] => B): BuildStep[F, B]
Inherited from:
BuildStep (hidden)
Source:
package.scala
def unsafeBuild(implicit F: MonadCancelThrow[F]): F[A]

Unsafely builds the metric, but does not deallocate

Unsafely builds the metric, but does not deallocate

Inherited from:
BuildStep (hidden)
Source:
package.scala
override def unsafeLabels(labelNames: Name*): CallbackBuildStep[F, L[F, A, Map[Name, String]], (A0, Map[Name, String])]

Creates a metric whose labels aren't checked at compile time. Provides a builder for a labelled metric that takes a map of label names to their values.

Creates a metric whose labels aren't checked at compile time. Provides a builder for a labelled metric that takes a map of label names to their values.

This should be used when the labels are not known at compile time and potentially come from some source at runtime.

Value parameters:
labelNames

glob of names of the labels

Definition Classes
Inherited from:
WithCallbacks
Source:
package.scala
override def unsafeLabels(labelNames: IndexedSeq[Name]): CallbackBuildStep[F, L[F, A, Map[Name, String]], (A0, Map[Name, String])]

Creates a metric whose labels aren't checked at compile time. Provides a builder for a labelled metric that takes a map of label names to their values.

Creates a metric whose labels aren't checked at compile time. Provides a builder for a labelled metric that takes a map of label names to their values.

This should be used when the labels are not known at compile time and potentially come from some source at runtime.

Value parameters:
labelNames

names of the labels

Definition Classes
Inherited from:
WithCallbacks
Source:
package.scala