WithCallbacks

sealed abstract class WithCallbacks[F[_]](val metricRegistry: MetricRegistry[F], callbackRegistry: CallbackRegistry[F], prefix: Option[Prefix], commonLabels: CommonLabels) extends MetricFactory[F]

Subtype of MetricFactory that can register metric callbacks with the DSL

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
class MetricFactory[F]
class Object
trait Matchable
class Any

Type members

Types

type HistogramCallbackDsl[G[_], A, M[_[_], _], L[_[_], _, _]] = WithCallbacks[G, A, Value[A], M, L]
type SimpleCallbackDsl[G[_], A, M[_[_], _], L[_[_], _, _]] = WithCallbacks[G, A, A, M, L]

Inherited types

type CounterDsl[MDsl[_[_], _, _[_[_], _], _[_[_], _, _]], A] = HelpStep[MDsl[F, A, [F[_], A] =>> Counter[F, A], Labelled]]
Inherited from:
MetricFactory
Source:
MetricFactory.scala
type GaugeDsl[MDsl[_[_], _, _[_[_], _], _[_[_], _, _]], A] = HelpStep[MDsl[F, A, [F[_], A] =>> Gauge[F, A], Labelled]]
Inherited from:
MetricFactory
Source:
MetricFactory.scala
type HistogramDsl[MDsl[_[_], _, _[_[_], _], _[_[_], _, _]], A] = HelpStep[BucketDsl[MDsl[F, A, [F[_], A] =>> Histogram[F, A], Labelled], A]]
Inherited from:
MetricFactory
Source:
MetricFactory.scala
type SummaryDslLambda[A] = HelpStep[Base[F, A]]
Inherited from:
MetricFactory
Source:
MetricFactory.scala

Value members

Concrete methods

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

Starts creating a "counter" metric.

Starts creating a "counter" metric.

Definition Classes
Source:
MetricFactory.scala

Creates a new instance of MetricFactory with any Metric.CommonLabels

Creates a new instance of MetricFactory with any Metric.CommonLabels

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

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

Starts creating a "gauge" metric.

Starts creating a "gauge" metric.

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

Starts creating a "histogram" metric.

Starts creating a "histogram" metric.

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].

Source:
MetricFactory.scala
def metricCollectionCallback(collection: F[MetricCollection]): BuildStep[F, Unit]
override def summary(name: Name): TypeStep[SummaryCallbackDsl]
Definition Classes
Source:
MetricFactory.scala
override def withCommonLabels(commonLabels: CommonLabels): WithCallbacks[F]

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

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

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

Definition Classes
Source:
MetricFactory.scala

Inherited methods

def info(name: Name): HelpStep[BuildStep[F, Info[F, Map[Name, String]]]]

Starts creating an "info" metric.

Starts creating an "info" metric.

Value parameters:
name

Info.Name value

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].

Inherited from:
MetricFactory
Source:
MetricFactory.scala