Skip to content

Commit 1004a7c

Browse files
zephyrtroniummknyszek
authored andcommitted
runtime/metrics: update documentation to current interface
The package documentation referenced sample metadata that was removed in CL 282632. Update this documentation to be less specific about what metadata is available. Additionally, the documentation on the Sample type referred to Descriptions instead of All as the source of metrics names. Fixes #44280. Change-Id: I24fc63a744bf498cb4cd5bda56c1599f6dd75929 Reviewed-on: https://go-review.googlesource.com/c/go/+/292309 Reviewed-by: Michael Knyszek <[email protected]> Trust: Michael Knyszek <[email protected]> Trust: Dmitri Shuralyov <[email protected]> Run-TryBot: Michael Knyszek <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 6530f26 commit 1004a7c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/runtime/metrics/doc.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Interface
1616
Metrics are designated by a string key, rather than, for example, a field name in
1717
a struct. The full list of supported metrics is always available in the slice of
1818
Descriptions returned by All. Each Description also includes useful information
19-
about the metric, such as how to display it (for example, gauge vs. counter)
20-
and how difficult or disruptive it is to obtain it (for example, do you need to
21-
stop the world?).
19+
about the metric.
2220
2321
Thus, users of this API are encouraged to sample supported metrics defined by the
2422
slice returned by All to remain compatible across Go versions. Of course, situations

src/runtime/metrics/sample.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Sample struct {
1414
// Name is the name of the metric sampled.
1515
//
1616
// It must correspond to a name in one of the metric descriptions
17-
// returned by Descriptions.
17+
// returned by All.
1818
Name string
1919

2020
// Value is the value of the metric sample.

0 commit comments

Comments
 (0)