Ritikj55 commented on code in PR #23763:
URL: https://github.com/apache/kafka/pull/23763#discussion_r4524476811
##########
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##########
@@ -44,12 +45,33 @@ public final class KafkaMetric implements Metric {
*/
@SuppressKafkaInternalApiUsage("KIP-1265: ctor leaks internal Time for
test injection — pending KIP review to promote Time or refactor")
public KafkaMetric(Object lock, MetricName metricName,
MetricValueProvider<?> valueProvider,
- MetricConfig config, Time time) {
+ MetricConfig config, Time time) {
this.metricName = metricName;
this.lock = lock;
this.metricValueProvider = Objects.requireNonNull(valueProvider,
"valueProvider must not be null");
this.config = config;
this.time = time;
+ this.recordingLevel = Optional.empty();
+ }
+
+ /**
+ * Constructor for KafkaMetric having recording level.
+ * @param lock The lock used to prevent race condition
+ * @param metricName The name of the metric
+ * @param valueProvider The metric value provider associated with this
metric
+ * @param config The configuration of the metric
+ * @param time The time instance to use with the metrics
+ * @param recordingLevel The recording level of the metric
+ */
+
+ public KafkaMetric(Object lock, MetricName metricName,
MetricValueProvider<?> valueProvider,
Review Comment:
Hey @stevenschlansker , sure makes sense reducing accessibility to default
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]