Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit a936c9f

Browse files
committed
Fix review comments
1 parent 4af1cdb commit a936c9f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

metrics/Gauge.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The `Gauge` values can be negative. This document describes the key types and th
88
The value that is published for gauges is an instantaneous measurement of an `int64` or `double` value. This API is useful when you want to manually increase and decrease values as per service requirements.
99

1010
The following general operations MUST be provided by the API:
11+
1112
* Defining a `name`, `description`, `unit`, `labelKeys`, `resource` and `constantLabels` which are fixed labels that always apply to a gauge. This should give back the gauge object to get or create time series, remove time series and clear all time series.
1213
* `name`: a string describing the name of the metric, e.g. "vm_cpu_cycles" or "queue_size". Names MUST be unique within the library. It is recommended to use names compatible with the intended end usage.
1314
* `description`: an optional string describing the metric, e.g."Virtual cycles executed on VM". The default is set to "".
@@ -43,7 +44,7 @@ LongGauge gauge = metricRegistry.longGaugeBuilder()
4344
.build();
4445

4546
LongPoint point = gauge.getOrCreateTimeSeries(labelValues);
46-
47+
4748
void doSomeWork() {
4849
point.set(15);
4950
}
@@ -55,14 +56,14 @@ It is recommended to keep a reference of a point for manual operations instead o
5556
The value that is published for gauges is an instantaneous measurement of an `int64` or `double` value. This gauge is self sufficient once created, so users should never need to interact with it. The value of the gauge is observed from the `object` and a `callback function`. The callback function is invoked whenever metrics are collected, meaning the reported value is up-to-date.
5657

5758
The following general operations MUST be provided by the API:
59+
5860
* Defining a `name`, `description`, `unit`, `labelKeys`, `resource` and `constantLabels` which are fixed labels that always apply to a gauge. This should give back gauge object to add new time series, remove time series and clear all time series.
59-
* `name`: a string describing the name of the metric, e.g. "vm_cpu_cycles". Names MUST be unique within the library. It is recommended to use names compatible with the intended end usage.
60-
* `description`: an optional string describing the metric, e.g."Virtual cycles executed on VM". The default is set to "".
61-
* `unit`: an optional string describing the unit used for the metric. Follows the format described by
62-
[Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html). The default set to "1".
63-
* `labelKeys`: an optional list of the label keys to track different types of metric. The default is set to empty list.
64-
* `constantLabels`: an optional map of label keys and label values. The default is set to empty map.
65-
* `resource`: an optional associated monitored resource information.
61+
* `name`: same as above name.
62+
* `description`: same as above description.
63+
* `unit`: same as above unit.
64+
* `labelKeys`: same as above labelKeys.
65+
* `constantLabels`: same as above constantLabels.
66+
* `resource`: same as above resource.
6667
* Add a new time series with label values, an `object` and a `callback function`. The number of label values must be the same to that of the label keys.
6768
* `labelValues`: the list of label values. The number of label values must be the same to that of the label keys.
6869
* `object`: the state object from which the function derives a measurement.

0 commit comments

Comments
 (0)