LabelledMetricDsl

prometheus4cats.internal.LabelledMetricDsl
See theLabelledMetricDsl companion object
class LabelledMetricDsl[F[_], A, T, L[_[_], _, _]] extends BaseLabelsBuildStep[F, A, T, L]

Attributes

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

Members list

Value members

Concrete methods

override def contramapLabels[B](f0: B => T): LabelledMetricDsl[F, A, B, L]

Attributes

Definition Classes
Source
package.scala
def label[B]: LabelApply[F, A, T, B, L]

Sets a new label for the metric, the label type will be joined together with previous types in a tuple. Requires either a Show instance for the label type, or a method converting the label value to a String.

Sets a new label for the metric, the label type will be joined together with previous types in a tuple. 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]: LabelsApply[F, A, T, B, L]

Sets a new set of labels for the 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 a new set of labels for the 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]: LabelsFromApply[F, A, T, B, L]

Attributes

Source
package.scala

Inherited methods

override def build: Resource[F, L[F, A, T]]

Builds the metric

Builds the metric

Attributes

Definition Classes
Inherited from:
BaseLabelsBuildStep
Source
package.scala
def map[B](f: L[F, A, T] => 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