|
13 | 13 | import java.util.concurrent.TimeUnit; |
14 | 14 |
|
15 | 15 | /** |
16 | | - * {@link Summary} metrics and {@link Histogram} metrics can both be used to monitor latencies (or other things like request sizes). |
| 16 | + * {@link Summary} metrics and {@link Histogram} metrics can both be used to monitor distributions like latencies or request sizes. |
17 | 17 | * <p> |
18 | 18 | * An overview of when to use Summaries and when to use Histograms can be found on <a href="https://prometheus.io/docs/practices/histograms">https://prometheus.io/docs/practices/histograms</a>. |
19 | 19 | * <p> |
|
47 | 47 | * The {@link Summary} class provides different utility methods for observing values, like {@link #observe(double)}, |
48 | 48 | * {@link #startTimer()} and {@link Timer#observeDuration()}, {@link #time(Callable)}, etc. |
49 | 49 | * <p> |
50 | | - * By default, {@link Summary} metrics provide the <tt>count</tt> and the <tt>sum</tt>. For example, if you measure |
51 | | - * latencies of a REST service, the <tt>count</tt> will tell you how often the REST service was called, |
52 | | - * and the <tt>sum</tt> will tell you the total aggregated response time. |
53 | | - * You can calculate the average response time using a Prometheus query dividing <tt>sum / count</tt>. |
| 50 | + * By default, {@link Summary} metrics provide the {@code count} and the {@code sum}. For example, if you measure |
| 51 | + * latencies of a REST service, the {@code count} will tell you how often the REST service was called, |
| 52 | + * and the {@code sum} will tell you the total aggregated response time. |
| 53 | + * You can calculate the average response time using a Prometheus query dividing {@code sum / count}. |
54 | 54 | * <p> |
55 | | - * In addition to <tt>count</tt> and <tt>sum</tt>, you can configure a Summary to provide quantiles: |
| 55 | + * In addition to {@code count} and {@code sum}, you can configure a Summary to provide quantiles: |
56 | 56 | * |
57 | 57 | * <pre> |
58 | 58 | * Summary requestLatency = Summary.build() |
|
76 | 76 | * |
77 | 77 | * <ul> |
78 | 78 | * <li>You can set an allowed error of 0, but then the {@link Summary} will keep all observations in memory.</li> |
79 | | - * <li>You can track the minimum value with <tt>.quantile(0.0, 0.0)</tt>. |
| 79 | + * <li>You can track the minimum value with {@code .quantile(0.0, 0.0)}. |
80 | 80 | * This special case will not use additional memory even though the allowed error is 0.</li> |
81 | | - * <li>You can track the maximum value with <tt>.quantile(1.0, 0.0)</tt>. |
| 81 | + * <li>You can track the maximum value with {@code .quantile(1.0, 0.0)}. |
82 | 82 | * This special case will not use additional memory even though the allowed error is 0.</li> |
83 | 83 | * </ul> |
84 | 84 | * |
|
0 commit comments