Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added more details on shouldRecord()

...

  • 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

  • The 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 be computed and recorded.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);
     }
    }

Compatibility, Deprecation, and Migration Plan

...