prometheus_collector.
buckets() = [{prometheus_buckets:bucket_bound(), non_neg_integer()}, ...]
counter() = value() | {value()} | {labels(), value()}
gauge() = value() | {value()} | {labels(), value()}
histogram() = {buckets(), non_neg_integer(), value()} | {labels(), buckets(), non_neg_integer(), value()}
label() = {label_name(), label_value()}
label_name() = term()
label_value() = term()
labels() = [label()] | pre_rendered_labels()
metrics() = tmetric() | [tmetric()]
pbool() = prometheus_boolean() | {prometheus_boolean()} | {labels(), prometheus_boolean()}
pre_rendered_labels() = binary()
prometheus_boolean() = boolean() | number() | list() | undefined
summary() = {non_neg_integer(), value()} | {labels(), non_neg_integer(), value()}
tmetric() = gauge() | counter() | untyped() | summary() | histogram() | pbool()
untyped() = value() | {value()} | {labels(), value()}
value() = float() | integer() | undefined | infinity
Equivalent to boolean_metric(Labels, Value).
boolean_metric(Labels, Value) -> prometheus_model:'Metric'()
Labels = labels()Value = prometheus_boolean()
Creates boolean metric with Labels and Value.
boolean_metrics(Values) -> any()
Equivalent to
lists:map(fun boolean_metric/1, Values).
Equivalent to counter_metric(Labels, Value).
Creates counter metric with Labels and Value.
counter_metrics(Specs) -> any()
Equivalent to
lists:map(fun counter_metric/1, Specs).
create_mf(Name, Help, Type, Metrics) -> MetricFamily
Name = prometheus_metric:name()Help = prometheus_metric:help()Type = atom()Metrics = [prometheus_model:'Metric'()] | prometheus_model:'Metric'() | metrics()MetricFamily = prometheus_model:'MetricFamily'()
Create Metric Family of Type, Name and Help.
Collector:collect_metrics/2 callback will be called and expected to
return individual metrics list.
create_mf(Name, Help, Type, Collector, CollectorData) -> MetricFamily
Name = prometheus_metric:name()Help = prometheus_metric:help()Type = atom()Collector = prometheus_collector:collector()CollectorData = prometheus_collector:data()MetricFamily = prometheus_model:'MetricFamily'()
Create Metric Family of Type, Name and Help.
Collector:collect_metrics/2 callback will be called and expected to
return individual metrics list.
Equivalent to gauge_metric(Labels, Value).
Creates gauge metric with Labels and Value.
gauge_metrics(Values) -> any()
Equivalent to
lists:map(fun gauge_metric/1, Values).
Equivalent to histogram_metric(Labels, Buckets, Count, Sum).
histogram_metric(Buckets, Count, Sum) -> any()
Equivalent to histogram_metric([], Buckets, Count, Sum).
histogram_metric(Labels, Buckets, Count, Sum) -> Metric
Labels = labels()Buckets = [{Bound, Count}]Bound = prometheus_buckets:bucket_bound()Count = non_neg_integer()Sum = value()Metric = prometheus_model:'Metric'()
Creates histogram metric with Labels, Buckets, Count and Sum.
histogram_metrics(Specs) -> any()
Equivalent to
lists:map(fun histogram_metric/1, Specs).
label_pair(X1::label()) -> prometheus_model:'LabelPair'()
Creates prometheus_model:LabelPair'()' from {Name, Value} tuple.
label_pairs(B) -> any()
Equivalent to
lists:map(fun label_pair/1, Labels).
metric_name(Name) -> binary()
Name = atom() | binary() | [char() | iolist() | binary() | atom()]
If Name is a list, looks for atoms and converts them to binaries.
Why iolists do not support atoms?
Equivalent to summary_metric(Labels, Count, Sum).
summary_metric(Count, Sum) -> any()
Equivalent to summary_metric([], Count, Sum).
summary_metric(Labels, Count, Sum) -> any()
Equivalent to summary_metric([], Count, Sum, []).
summary_metric(Labels, Count, Sum, Quantiles) -> prometheus_model:'Metric'()
Creates summary metric with Labels, Count and Sum.
summary_metrics(Specs) -> any()
Equivalent to
lists:map(fun summary_metric/1, Specs).
Equivalent to untyped_metric(Labels, Value).
Creates untyped metric with Labels and Value.
untyped_metrics(Values) -> any()
Equivalent to
lists:map(fun untyped_metric/1, Values).
Generated by EDoc