Skip to content

Commit

Permalink
Address code review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Brazil <[email protected]>
  • Loading branch information
brian-brazil committed Jan 22, 2021
1 parent 784db17 commit cf018d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions simpleclient/src/main/java/io/prometheus/client/Counter.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
* </pre>
* These can be aggregated and processed together much more easily in the Prometheus
* server than individual metrics for each labelset.
*
* If there is a suffix of <code>_total</code> on the metric name, it will be
* removed. When exposing the time series for counter value, a
* <code>_total</code> suffix will be added. This is for compatibility between
* OpenMetrics and the Prometheus text format, as OpenMetrics requires the
* <code>_total</code> suffix.
*/
public class Counter extends SimpleCollector<Counter.Child> implements Collector.Describable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public B namespace(String namespace) {
return (B)this;
}
/**
* Set the uit of the metric. Required.
* Set the unit of the metric. Required.
*/
public B unit(String unit) {
this.unit = unit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public void loadingCacheExposesMetricsForLoadsAndExceptions() throws Exception {
}
cache.get("user3");


assertMetric(registry, "caffeine_cache_hit_total", "loadingusers", 1.0);
assertMetric(registry, "caffeine_cache_miss_total", "loadingusers", 3.0);

Expand Down

0 comments on commit cf018d1

Please sign in to comment.