Gauge constructor

Gauge({
  1. required String name,
  2. required String help,
  3. List<String> labelNames = const [],
  4. Collect<Gauge>? collectCallback,
})

Construct a new Gauge with a name, help text and optional labelNames. If labelNames are provided, use labels(...) to assign label values. The optional collectCallback is called at the beginning of collect and allows to update the value of the gauge before collecting it.

Implementation

Gauge({
  required String name,
  required String help,
  List<String> labelNames = const [],
  this.collectCallback,
}) : super(name: name, help: help, labelNames: labelNames);