mirror of https://github.com/apache/kafka.git
Update the outdated Javadocs in Metrics.java. The `MetricName(String
name, String group)` constructor in MetricName.java was removed in
59b918ec2b
Minor typo fixes included.
Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
2e3ddb22ae
commit
4e31e270ba
|
@ -20,7 +20,7 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* The <code>MetricName</code> class encapsulates a metric's name, logical group and its related attributes. It should be constructed using metrics.MetricName(...).
|
||||
* The <code>MetricName</code> class encapsulates a metric's name, logical group and its related attributes. It should be constructed using metrics.metricName(...).
|
||||
* <p>
|
||||
* This class captures the following parameters:
|
||||
* <pre>
|
||||
|
|
|
@ -48,7 +48,7 @@ import static java.util.Collections.emptyList;
|
|||
* A registry of sensors and metrics.
|
||||
* <p>
|
||||
* A metric is a named, numerical measurement. A sensor is a handle to record numerical measurements as they occur. Each
|
||||
* Sensor has zero or more associated metrics. For example a Sensor might represent message sizes and we might associate
|
||||
* Sensor has zero or more associated metrics. For example, a Sensor might represent message sizes, and we might associate
|
||||
* with this sensor a metric for the average, maximum, or other statistics computed off the sequence of message sizes
|
||||
* that are recorded by the sensor.
|
||||
* <p>
|
||||
|
@ -58,9 +58,9 @@ import static java.util.Collections.emptyList;
|
|||
* // set up metrics:
|
||||
* Metrics metrics = new Metrics(); // this is the global repository of metrics and sensors
|
||||
* Sensor sensor = metrics.sensor("message-sizes");
|
||||
* MetricName metricName = new MetricName("message-size-avg", "producer-metrics");
|
||||
* MetricName metricName = metrics.metricName("message-size-avg", "producer-metrics");
|
||||
* sensor.add(metricName, new Avg());
|
||||
* metricName = new MetricName("message-size-max", "producer-metrics");
|
||||
* metricName = metrics.metricName("message-size-max", "producer-metrics");
|
||||
* sensor.add(metricName, new Max());
|
||||
*
|
||||
* // as messages are sent we record the sizes
|
||||
|
|
Loading…
Reference in New Issue