recordGauge static method

void recordGauge(
  1. String name,
  2. num value, {
  3. Map<String, String>? tags,
})

Records a gauge metric (a value that can go up or down).

Implementation

static void recordGauge(String name, num value, {Map<String, String>? tags}) {
  if (!_enabled) return;

  record(
    Metric(name: name, type: MetricType.gauge, value: value, tags: tags),
  );
}