WithCallbacks

prometheus4cats.MetricFactory$.WithCallbacks
See theWithCallbacks companion object

Subtype of MetricFactory that can register metric callbacks with the DSL

Attributes

Note

Calling MetricFactory.WithCallbacks.mapK will return a MetricFactory only. To change the type of F and return a MetricFactory.WithCallbacks you must you MetricFactory.WithCallbacks.imapK.

Companion
object
Source
MetricFactory.scala
Graph
Supertypes
class MetricFactory[F]
class Object
trait Matchable
class Any

Members list

Type members

Types

type HistogramCallbackDsl[G[_], A, H[_[_], _, _]] = WithCallbacks[G, A, Value[A], H]

Attributes

Source
MetricFactory.scala
type SimpleCallbackDsl[G[_], A, H[_[_], _, _]] = WithCallbacks[G, A, A, H]

Attributes

Source
MetricFactory.scala

Inherited types

type CounterDsl[MDsl[_[_], _, _[_[_], _, _]], A] = HelpStep[MDsl[F, A, [F[_], A, B] =>> Counter[F, A, B]]]

Attributes

Inherited from:
MetricFactory
Source
MetricFactory.scala
type GaugeDsl[MDsl[_[_], _, _[_[_], _, _]], A] = HelpStep[MDsl[F, A, [F[_], A, B] =>> Gauge[F, A, B]]]

Attributes

Inherited from:
MetricFactory
Source
MetricFactory.scala
type HistogramDsl[MDsl[_[_], _, _[_[_], _, _]], A] = HelpStep[BucketDsl[MDsl[F, A, [F[_], A, B] =>> Histogram[F, A, B]], A]]

Attributes

Inherited from:
MetricFactory
Source
MetricFactory.scala

Attributes

Inherited from:
MetricFactory
Source
MetricFactory.scala

Value members

Concrete methods

override def counter(name: Name): TypeStep[[_] =>> CounterDsl[SimpleCallbackDsl, _$42]]

Starts creating a "counter" metric.

Starts creating a "counter" metric.

Attributes

Definition Classes
Source
MetricFactory.scala
override def dropCommonLabels: WithCallbacks[F]

Creates a new instance of MetricFactory with any Metric.CommonLabels

Creates a new instance of MetricFactory with any Metric.CommonLabels

Attributes

Definition Classes
Source
MetricFactory.scala
override def dropPrefix: WithCallbacks[F]

Creates a new instance of MetricFactory without a Metric.Prefix set

Creates a new instance of MetricFactory without a Metric.Prefix set

Attributes

Definition Classes
Source
MetricFactory.scala
override def gauge(name: Name): TypeStep[[_] =>> GaugeDsl[SimpleCallbackDsl, _$40]]

Starts creating a "gauge" metric.

Starts creating a "gauge" metric.

Attributes

Definition Classes
Source
MetricFactory.scala
override def histogram(name: Name): TypeStep[[_] =>> HistogramDsl[HistogramCallbackDsl, _$49]]

Starts creating a "histogram" metric.

Starts creating a "histogram" metric.

Attributes

Definition Classes
Source
MetricFactory.scala
def imapK[G[_]](fk: FunctionK[F, G], gk: FunctionK[G, F])(implicit F: MonadCancel[F, _], G: MonadCancel[G, _]): WithCallbacks[G]

Given a natural transformation from F to G and from G to F, transforms this MetricFactory.WithCallbacks from effect F to effect G. The G constraint can also be satisfied by requiring a Functor[G].

Given a natural transformation from F to G and from G to F, transforms this MetricFactory.WithCallbacks from effect F to effect G. The G constraint can also be satisfied by requiring a Functor[G].

Attributes

Source
MetricFactory.scala

Attributes

Definition Classes
Source
MetricFactory.scala

Creates a new instance of MetricFactory with the provided Metric.CommonLabels

Creates a new instance of MetricFactory with the provided Metric.CommonLabels

Attributes

Definition Classes
Source
MetricFactory.scala
override def withPrefix(prefix: Prefix): WithCallbacks[F]

Creates a new instance of MetricFactory with the given Metric.Prefix set

Creates a new instance of MetricFactory with the given Metric.Prefix set

Attributes

Definition Classes
Source
MetricFactory.scala

Inherited methods

Starts creating an "info" metric.

Starts creating an "info" metric.

Value parameters

name

Info.Name value

Attributes

Returns

Info builder

Example
metrics.info("app_info").help("my counter help").build
Inherited from:
MetricFactory
Source
MetricFactory.scala
def mapK[G[_]](fk: FunctionK[F, G])(implicit F: MonadCancel[F, _], G: MonadCancel[G, _]): MetricFactory[G]

Given a natural transformation from F to G, transforms this MetricFactory from effect F to effect G. The G constraint can also be satisfied by requiring a Functor[G].

Given a natural transformation from F to G, transforms this MetricFactory from effect F to effect G. The G constraint can also be satisfied by requiring a Functor[G].

Attributes

Inherited from:
MetricFactory
Source
MetricFactory.scala