private void collectGauge(MetricKey metricKey, Number value, MetricsEmitter metricsEmitter, Instant timestamp) {
        if (!metricsEmitter.shouldEmitMetric(metricKey)) {
            return;
        }

        metricsEmitter.emitMetric(
            SinglePointMetric.gauge(metricKey, value, timestamp, excludeLabels)
        );
    }
This is called whenever temporality changes, resets the value tracker for metrics.
clients/src/main/java/org/apache/kafka/common/telemetry/internals/KafkaMetricsCollector.java