Collector.collect - multiple declarations
Function Collector.collect
Collect stats from the data members of a struct or a class and prepare
them to be fetched upon the next call to getCollection
. The
specifications of the format of the collected stats can be found at
https://prometheus.io/docs/instrumenting/exposition_formats/
.
void collect(ValuesT)
(
ValuesT values
);
Parameters
Name | Description |
---|---|
ValuesT | The struct or class type to fetch the stat names from. |
values | The struct or class to fetch stat values from. |
Function Collector.collect
Collect stats from the data members of a struct or a class, annotate
them with a given label name and value, and prepare them to be fetched
upon the next call to getCollection
.
The specifications of the format of the collected stats can be found
at https://prometheus.io/docs/instrumenting/exposition_formats/
.
void collect(string LabelName, ValuesT, LabelT)
(
ValuesT values,
LabelT label_val
);
Parameters
Name | Description |
---|---|
LabelName | The name of the label to annotate the stats with. |
ValuesT | The struct or class type to fetch the stat names from. |
LabelT | The type of the label's value. |
values | The struct or class to fetch stat values from. |
label_val | The label value to annotate the stats with. |
Function Collector.collect
Collect stats from the data members of a struct or a class, annotate
them with labels from the data members of another struct or class, and
prepare them to be fetched upon the next call to getCollection
.
The specifications of the format of the collected stats can be found
at https://prometheus.io/docs/instrumenting/exposition_formats/
.
void collect(ValuesT, LabelsT)
(
ValuesT values,
LabelsT labels
);
Parameters
Name | Description |
---|---|
ValuesT | The struct or class type to fetch the stat names from. |
LabelsT | The struct or class type to fetch the label names from. |
values | The struct or class to fetch stat values from. |
labels | The struct or class holding the label values to annotate the stats with. |