diff --git a/README.md b/README.md index 841183eca..cc160e338 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ when using this approach ensure the value you are reporting accounts for concurr ### Summary -Summaries and Histograms can both be used to monitor latencies (or other things like request sizes). +Summaries and Histograms can both be used to monitor distributions, like latencies or request sizes. An overview of when to use Summaries and when to use Histograms can be found on [https://prometheus.io/docs/practices/histograms](https://prometheus.io/docs/practices/histograms). diff --git a/simpleclient/src/main/java/io/prometheus/client/SimpleCollector.java b/simpleclient/src/main/java/io/prometheus/client/SimpleCollector.java index ec321ba0a..5c5bf7c37 100644 --- a/simpleclient/src/main/java/io/prometheus/client/SimpleCollector.java +++ b/simpleclient/src/main/java/io/prometheus/client/SimpleCollector.java @@ -11,7 +11,7 @@ *
* This class handles common initialization and label logic for the standard metrics. * You should never subclass this class. - *
+ * *
* An overview of when to use Summaries and when to use Histograms can be found on https://prometheus.io/docs/practices/histograms. *
@@ -47,12 +47,12 @@ * The {@link Summary} class provides different utility methods for observing values, like {@link #observe(double)}, * {@link #startTimer()} and {@link Timer#observeDuration()}, {@link #time(Callable)}, etc. *
- * By default, {@link Summary} metrics provide the count and the sum. For example, if you measure - * latencies of a REST service, the count will tell you how often the REST service was called, - * and the sum will tell you the total aggregated response time. - * You can calculate the average response time using a Prometheus query dividing sum / count. + * By default, {@link Summary} metrics provide the {@code count} and the {@code sum}. For example, if you measure + * latencies of a REST service, the {@code count} will tell you how often the REST service was called, + * and the {@code sum} will tell you the total aggregated response time. + * You can calculate the average response time using a Prometheus query dividing {@code sum / count}. *
- * In addition to count and sum, you can configure a Summary to provide quantiles: + * In addition to {@code count} and {@code sum}, you can configure a Summary to provide quantiles: * *
* Summary requestLatency = Summary.build() @@ -76,9 +76,9 @@ * *
- *
{@code + **/ public class JettyStatisticsCollector extends Collector { private final StatisticsHandler statisticsHandler;* Server server = new Server(8080); * * ServletContextHandler context = new ServletContextHandler(); @@ -29,7 +28,7 @@ * server.setHandler(handlers); * * server.start(); - * }+ *