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

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

Parameters

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 ValuesT

The struct or class to fetch stat values from.

label_val LabelT

The label value to annotate the stats with.

Meta