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

  1. void collect(ValuesT values)
  2. void collect(ValuesT values, LabelT label_val)
  3. void collect(ValuesT values, LabelsT labels)
    class Collector
    void
    collect
    (
    ValuesT
    LabelsT
    )
    (
    ValuesT values
    ,
    LabelsT labels
    )

Parameters

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 ValuesT

The struct or class to fetch stat values from.

labels LabelsT

The struct or class holding the label values to annotate the stats with.

Meta