void recordRecordsFetched(String topic, int records) {
        String name = topicRecordsFetchedMetricName(topic);
        Sensor recordsFetched = new SensorBuilder(metrics, name, () -> topicTags(topic))
                .withAvg(metricsRegistry.topicRecordsPerRequestAvg)
                .withMeter(metricsRegistry.topicRecordsConsumedRate, metricsRegistry.topicRecordsConsumedTotal)
                .build();
        recordsFetched.record(records);
    }
The {@link FetchMetricsManager} class provides wrapper methods to record lag, lead, latency, and fetch metrics.
It keeps an internal ID of the assigned set of partitions which is updated to ensure the set of metrics it
records matches up with the topic-partitions in use.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchMetricsManager.java