THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The ClientConfig will have a new option called 'metrics.record.level' which is set to match the record levels of INFO or DEBUG while defining the consumer config.
- In Sensor.java the shouldRecord() method is used to compare the value of metric record level in the consumer config and the RecordLevel associated with the sensor, to determine if metrics should recorded.
From Sensor.java/**
* @return true if the sensor's record level indicates that the metric will be recorded, false otherwise
*/
public boolean shouldRecord() {
return this.recordLevel.shouldRecord(config.recordLevel());
}From nested enum, Sensor.RecordLevel
public boolean shouldRecord(final RecordLevel configLevel) {
if (configLevel.equals(DEBUG)) {
return true;
} else {
return configLevel.equals(this);
}
} - Further, since both StreamsConfig.java and KafkaConfig.scala use CommonClientConfigs, we also expose that field in both classes respectively.
- Note that any MetricReporter implementations have access to the record level via KafkaMetric.config().recordLevel(). Furthermore, the MetricReporters can retrieve the active config for the record level via the configure method.
Compatibility, Deprecation, and Migration Plan
...