instrument_vector (instrument v1.0.0)

View Source

Summary

Types

label_values/0

-type label_values() :: list().

metric_name/0

-type metric_name() :: atom() | binary() | string().

Functions

clear_labels(Name)

collect(Name)

-spec collect(metric_name()) -> map().

get_or_create_label(Name, LabelValues)

-spec get_or_create_label(metric_name(), label_values()) ->
                             {ok,
                              #metric{name :: term(),
                                      handle :: term(),
                                      collect :: tuple(),
                                      description :: binary() | undefined,
                                      unit :: binary() | undefined,
                                      meter :: binary() | undefined,
                                      attributes :: map()}} |
                             {error, term()}.

new(Labels, MetricType, Name, Help)

-spec new(list(), atom(), metric_name(), binary() | string()) ->
             #metric{name :: term(),
                     handle :: term(),
                     collect :: tuple(),
                     description :: binary() | undefined,
                     unit :: binary() | undefined,
                     meter :: binary() | undefined,
                     attributes :: map()}.

new(Labels, MetricType, Name, Help, Buckets)

-spec new(list(), atom(), metric_name(), binary() | string(), list()) ->
             #metric{name :: term(),
                     handle :: term(),
                     collect :: tuple(),
                     description :: binary() | undefined,
                     unit :: binary() | undefined,
                     meter :: binary() | undefined,
                     attributes :: map()}.

remove_label(Name, Label)

with(VectorMetric, Fun)

with_label(VectorMetric, Label, Fun)

with_label(VectorMetric, Label, Fun, V)