CallbackRegistry

prometheus4cats.CallbackRegistry
See theCallbackRegistry companion object
trait CallbackRegistry[F[_]]

Trait for registering callbacks against different backends. May be implemented by anyone for use with MetricFactory.WithCallbacks

Attributes

Companion
object
Source
CallbackRegistry.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def registerDoubleCounterCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Double, A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled counter value that records scala.Double values against a metrics registry

Register a labelled counter value that records scala.Double values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of scala.Double and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerDoubleGaugeCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Double, A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled gauge value that records scala.Double values against a metrics registry

Register a labelled gauge value that records scala.Double values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of scala.Double and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerDoubleHistogramCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], buckets: NonEmptySeq[Double], callback: F[NonEmptyList[(Value[Double], A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled histogram value that records scala.Double values against a metrics registry

Register a labelled histogram value that records scala.Double values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of Histogram.Value parameterised with scala.Double and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerDoubleSummaryCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Value[Double], A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled summary value that records scala.Double values against a metrics registry

Register a labelled summary value that records scala.Double values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of Summary.Value parameterised with scala.Double and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Summary.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

a Summary wrapped in whatever side effect that was performed in registering it

Source
CallbackRegistry.scala
def registerLongCounterCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Long, A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled counter value that records scala.Long values against a metrics registry

Register a labelled counter value that records scala.Long values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of scala.Long and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerLongGaugeCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Long, A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled gauge value that records scala.Long values against a metrics registry

Register a labelled gauge value that records scala.Long values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of scala.Long and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerLongHistogramCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], buckets: NonEmptySeq[Long], callback: F[NonEmptyList[(Value[Long], A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled histogram value that records scala.Long values against a metrics registry

Register a labelled histogram value that records scala.Long values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of Histogram.Value parameterised with scala.Long and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Counter.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

An empty side effect to indicate that the callback has been registered

Source
CallbackRegistry.scala
def registerLongSummaryCallback[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], callback: F[NonEmptyList[(Value[Long], A)]])(f: A => IndexedSeq[String]): Resource[F, Unit]

Register a labelled summary value that records scala.Long values against a metrics registry

Register a labelled summary value that records scala.Long values against a metrics registry

Value parameters

callback

Some effectful operation that returns a cats.data.NonEmptyList of Summary.Value parameterised with scala.Long and label value tuples

commonLabels

Metric.CommonLabels map of common labels to be added to the metric

f

a function from A to an scala.IndexedSeq of java.lang.String that provides label values, which must be paired with their corresponding name in the scala.IndexedSeq of Label.Names

help

Metric.Help string to describe the metric

labelNames

an scala.IndexedSeq of Label.Names to annotate the metric with

name

Summary.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

a Summary wrapped in whatever side effect that was performed in registering it

Source
CallbackRegistry.scala
def registerMetricCollectionCallback(prefix: Option[Prefix], commonLabels: CommonLabels, callback: F[MetricCollection]): Resource[F, Unit]

Attributes

Source
CallbackRegistry.scala

Concrete methods

final def imapK[G[_]](fk: FunctionK[F, G], gk: FunctionK[G, F])(implicit F: MonadCancel[F, _], G: MonadCancel[G, _]): CallbackRegistry[G]

Given a natural transformation from F to G and from G to F, transforms this CallbackRegistry from effect F to effect G

Given a natural transformation from F to G and from G to F, transforms this CallbackRegistry from effect F to effect G

Attributes

Source
CallbackRegistry.scala