TestingMetricRegistry

prometheus4cats.testing.TestingMetricRegistry
See theTestingMetricRegistry companion object
sealed abstract class TestingMetricRegistry[F[_]] extends DoubleMetricRegistry[F], DoubleCallbackRegistry[F]

Attributes

Companion
object
Source
TestingMetricRegistry.scala
Graph
Supertypes
trait CallbackRegistry[F]
trait MetricRegistry[F]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def counterHistory(name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def counterHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def counterHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def counterHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
override def createAndRegisterDoubleCounter[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name])(f: A => IndexedSeq[String]): Resource[F, Counter[F, Double, A]]

Create and register a labelled counter that records scala.Double values against a metrics registry

Create and register a labelled counter that records scala.Double values against a metrics registry

Value parameters

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

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

Definition Classes
Source
TestingMetricRegistry.scala
override def createAndRegisterDoubleGauge[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name])(f: A => IndexedSeq[String]): Resource[F, Gauge[F, Double, A]]

Create and register a labelled gauge that records scala.Double values against a metrics registry

Create and register a labelled gauge that records scala.Double values against a metrics registry

Value parameters

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

Gauge.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

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

Definition Classes
Source
TestingMetricRegistry.scala
override def createAndRegisterDoubleHistogram[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], buckets: NonEmptySeq[Double])(f: A => IndexedSeq[String]): Resource[F, Histogram[F, Double, A]]

Create and register a labelled histogram against a metrics registry

Create and register a labelled histogram against a metrics registry

Value parameters

buckets

a cats.data.NonEmptySeq of scala.Doubles representing bucket values for the histogram

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

Histogram.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

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

Definition Classes
Source
TestingMetricRegistry.scala
override def createAndRegisterDoubleSummary[A](prefix: Option[Prefix], name: Name, help: Help, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], quantiles: Seq[QuantileDefinition], maxAge: FiniteDuration, ageBuckets: AgeBuckets)(f: A => IndexedSeq[String]): Resource[F, Summary[F, Double, A]]

Create and register a summary that records scala.Double values against a metrics registry

Create and register a summary that records scala.Double values against a metrics registry

Value parameters

ageBuckets

how many intervals there should be in a given time window defined by maxAge. For example, if a time window of 10 minutes and 5 age buckets, i.e. the time window is 10 minutes wide, and we slide it forward every 2 minutes.

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

maxAge

a scala.concurrent.duration.FiniteDuration indicating a window over which the summary should be calculate. Typically, you don't want to have a Summary representing the entire runtime of the application, but you want to look at a reasonable time interval. Summary metrics should implement a configurable sliding time window.

name

Summary.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

quantiles

a scala.Seq of Summary.QuantileDefinitions representing bucket values for the summary. Quantiles are expensive to calculate, so this may be empty.

Attributes

Returns

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

Definition Classes
Source
TestingMetricRegistry.scala
override def createAndRegisterInfo(prefix: Option[Prefix], name: Name, help: Help): Resource[F, Info[F, Map[Name, String]]]

Create and register an info metric against a metrics registry

Create and register an info metric against a metrics registry

Value parameters

help

Metric.Help string to describe the metric

name

Histogram.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

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

Definition Classes
Source
TestingMetricRegistry.scala
def exemplarCounterHistory(name: Name, commonLabels: CommonLabels): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def exemplarCounterHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def exemplarCounterHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def exemplarCounterHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala

Attributes

Source
TestingMetricRegistry.scala
def exemplarHistogramHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def exemplarHistogramHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def exemplarHistogramHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
def gaugeHistory(name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def gaugeHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def gaugeHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def gaugeHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def histogramHistory(name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def histogramHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def histogramHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def histogramHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def infoValue(prefix: Option[Prefix], name: Name): F[Option[Double]]

Attributes

Source
TestingMetricRegistry.scala
def metricHistory(name: String, labelNames: List[String], labelValues: List[String], tpe: MetricType): F[Option[Chain[(Double, Option[Labels])]]]

Attributes

Source
TestingMetricRegistry.scala
override 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

Definition Classes
Source
TestingMetricRegistry.scala
override 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

Definition Classes
Source
TestingMetricRegistry.scala
override 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

Definition Classes
Source
TestingMetricRegistry.scala
override 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

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

Attributes

Definition Classes
Source
TestingMetricRegistry.scala
def summaryHistory(name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def summaryHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def summaryHistory(name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala
def summaryHistory(prefix: Option[Prefix], name: Name, commonLabels: CommonLabels, labelNames: IndexedSeq[Name], labelValues: IndexedSeq[String]): F[Option[Chain[Double]]]

Attributes

Source
TestingMetricRegistry.scala

Inherited methods

Create and register a labelled counter that records scala.Long values against a metrics registry

Create and register a labelled counter that records scala.Long values against a metrics registry

Value parameters

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

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

Definition Classes
Inherited from:
DoubleMetricRegistry
Source
DoubleMetricRegistry.scala

Create and register a labelled gauge that records scala.Long values against a metrics registry

Create and register a labelled gauge that records scala.Long values against a metrics registry

Value parameters

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

Gauge.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

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

Definition Classes
Inherited from:
DoubleMetricRegistry
Source
DoubleMetricRegistry.scala

Create and register a labelled histogram against a metrics registry

Create and register a labelled histogram against a metrics registry

Value parameters

buckets

a cats.data.NonEmptySeq of scala.Doubles representing bucket values for the histogram

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

Histogram.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

Attributes

Returns

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

Definition Classes
Inherited from:
DoubleMetricRegistry
Source
DoubleMetricRegistry.scala

Create and register a summary that records scala.Long values against a metrics registry

Create and register a summary that records scala.Long values against a metrics registry

Value parameters

ageBuckets

how many intervals there should be in a given time window defined by maxAge. For example, if a time window of 10 minutes and 5 age buckets, i.e. the time window is 10 minutes wide, and we slide it forward every 2 minutes.

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

maxAge

a scala.concurrent.duration.FiniteDuration indicating a window over which the summary should be calculate. Typically, you don't want to have a Summary representing the entire runtime of the application, but you want to look at a reasonable time interval. Summary metrics should implement a configurable sliding time window.

name

Summary.Name metric name

prefix

optional Metric.Prefix to be prepended to the metric name

quantiles

a scala.Seq of Summary.QuantileDefinitions representing bucket values for the summary. Quantiles are expensive to calculate, so this may be empty.

Attributes

Returns

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

Definition Classes
Inherited from:
DoubleMetricRegistry
Source
DoubleMetricRegistry.scala
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

Inherited from:
CallbackRegistry
Source
CallbackRegistry.scala
def mapK[G[_]](fk: FunctionK[F, G])(implicit F: MonadCancel[F, _], G: MonadCancel[G, _]): MetricRegistry[G]

Attributes

Inherited from:
MetricRegistry
Source
MetricRegistry.scala

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

Definition Classes
Inherited from:
DoubleCallbackRegistry
Source
DoubleCallbackRegistry.scala

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

Definition Classes
Inherited from:
DoubleCallbackRegistry
Source
DoubleCallbackRegistry.scala

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

Definition Classes
Inherited from:
DoubleCallbackRegistry
Source
DoubleCallbackRegistry.scala

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

Definition Classes
Inherited from:
DoubleCallbackRegistry
Source
DoubleCallbackRegistry.scala

Implicits

Implicits

implicit override val F: Concurrent[F]

Attributes

Source
TestingMetricRegistry.scala