MetricFactory

prometheus4cats.MetricFactory
See theMetricFactory companion object
sealed abstract class MetricFactory[F[_]](val metricRegistry: MetricRegistry[F], val prefix: Option[Prefix], val commonLabels: CommonLabels)

Attributes

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

Members list

Type members

Types

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

Attributes

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

Attributes

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

Attributes

Source
MetricFactory.scala
type SummaryDslLambda[A] = HelpStep[Base[F, A]]

Attributes

Source
MetricFactory.scala

Value members

Concrete methods

def counter(name: Name): TypeStep[[_] =>> CounterDsl[[F[_], A, L[_[_], _, _]] =>> MetricDsl[F, A, L], _$21]]

Starts creating a "counter" metric.

Starts creating a "counter" metric.

Value parameters

name

Counter.Name value

Attributes

Returns

Counter builder

Example
 metrics.counter("my_counter").ofLong.help("my counter help") .label[Int]("first_label")
 .label[String]("second_label") .label[Boolean]("third_label") .build 
Source
MetricFactory.scala

Creates a new instance of MetricFactory with any Metric.CommonLabels

Creates a new instance of MetricFactory with any Metric.CommonLabels

Attributes

Source
MetricFactory.scala

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

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

Attributes

Source
MetricFactory.scala
def gauge(name: Name): TypeStep[[_] =>> GaugeDsl[[F[_], A, L[_[_], _, _]] =>> MetricDsl[F, A, L], _$11]]

Starts creating a "gauge" metric.

Starts creating a "gauge" metric.

Value parameters

name

Gauge.Name value

Attributes

Returns

Gauge builder

Example
 metrics.gauge("my_gauge").ofDouble.help("my gauge help").label[Int]("first_label")
 .label[String]("second_label").label[Boolean]("third_label") .build 
Source
MetricFactory.scala
def histogram(name: Name): TypeStep[[_] =>> HistogramDsl[[F[_], A, L[_[_], _, _]] =>> MetricDsl[F, A, L], _$31]]

Starts creating a "histogram" metric.

Starts creating a "histogram" metric.

Value parameters

name

Histogram.Name value

Attributes

Returns

Histogram builder

Example
 metrics.histogram("my_histogram").ofDouble.help("my counter help").buckets(1.0, 2.0)
 .label[Int]("first_label").label[String]("second_label").label[Boolean]("third_label") .build 
Source
MetricFactory.scala
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

Attributes

Returns

Info builder

Example
metrics.info("app_info").help("my counter help").build
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

Source
MetricFactory.scala

Attributes

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

Source
MetricFactory.scala
def withPrefix(prefix: Prefix): MetricFactory[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

Source
MetricFactory.scala

Concrete fields

Attributes

Source
MetricFactory.scala