MetricDsl

prometheus4cats.internal.MetricDsl
See theMetricDsl companion object
class MetricDsl[F[_], A, L[_[_], _, _]] extends BuildStep[F, L[F, A, Unit]]

Attributes

Companion
object
Source
package.scala
Graph
Supertypes
trait BuildStep[F, L[F, A, Unit]]
class Object
trait Matchable
class Any
Known subtypes
class AgeBucketsStep[F, A]
class SummaryDsl[F, A]
class WithCallbacks[F, A, A0, L]
class WithCallbacks[F, A, A0]

Members list

Value members

Concrete methods

def asOutcomeRecorder: BuildStep[F, Aux[F, A, Unit, [F[_], A, B] =>> Counter[F, A, B]]]
Implicitly added by CounterSyntax

Attributes

Source
package.scala
def asOutcomeRecorder(implicit F: MonadCancelThrow[F]): BuildStep[F, Aux[F, A, Unit, [F[_], A, B] =>> Gauge[F, A, B]]]
Implicitly added by GaugeSyntax

Attributes

Source
package.scala
override def build: Resource[F, L[F, A, Unit]]

Builds the metric

Builds the metric

Attributes

Definition Classes
Source
package.scala
def contramap[B](f: B => A): BuildStep[F, Counter[F, B, Unit]]
Implicitly added by CounterSyntax

Attributes

Source
package.scala
def contramap[B](f: B => A): BuildStep[F, Gauge[F, B, Unit]]
Implicitly added by GaugeSyntax

Attributes

Source
package.scala
def label[B]: FirstLabelApply[F, A, 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.

Attributes

Source
package.scala
def labels[B](labels: (Name, B => Value)*): LabelledMetricDsl[F, A, B, L]

Sets the first labels for a metric coming from a single type. Takes a collection of label name and a function converting some label object B to a string pairs.

Sets the first labels for a metric coming from a single type. Takes a collection of label name and a function converting some label object B to a string pairs.

This is useful where a single type B translates to multiple labels.

Type parameters

B

type to convert into labels

N

size of the label collection

Value parameters

labelNames

collection of labels name & function to convert B in to a label value pairs

Attributes

Source
package.scala
def labelsFrom[B](implicit encoder: Encoder[B]): LabelledMetricDsl[F, A, B, L]

Attributes

Source
package.scala
def unsafeLabels(labelNames: IndexedSeq[Name]): BuildStep[F, L[F, A, 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

Attributes

Source
package.scala
def unsafeLabels(labelNames: Name*): BuildStep[F, L[F, A, 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

Attributes

Source
package.scala

Inherited methods

def map[B](f: L[F, A, Unit] => B): BuildStep[F, B]

Attributes

Inherited from:
BuildStep
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

Attributes

Inherited from:
BuildStep
Source
package.scala