Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/metrics: docs reference nonexistent names and removed features #44280

Closed
zephyrtronium opened this issue Feb 16, 2021 · 2 comments
Closed
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zephyrtronium
Copy link
Contributor

The docs on Sample specify that the Name field must be set to a description returned by Descriptions. I believe this should refer to All instead, because there is no identifier named Descriptions in package metrics.

type Sample struct {
// Name is the name of the metric sampled.
//
// It must correspond to a name in one of the metric descriptions
// returned by Descriptions.
Name string

Additionally, the package-level documentation mentions that Description values describe "how difficult or disruptive it is to obtain," but this information appears to have been removed in 8f6a9ac to save for the future. The only information of the style the documentation describes is whether a metric is cumulative.

Metrics are designated by a string key, rather than, for example, a field name in
a struct. The full list of supported metrics is always available in the slice of
Descriptions returned by All. Each Description also includes useful information
about the metric, such as how to display it (for example, gauge vs. counter)
and how difficult or disruptive it is to obtain it (for example, do you need to
stop the world?).

@gopherbot
Copy link

Change https://golang.org/cl/292309 mentions this issue: runtime/metrics: update documentation to current interface

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 16, 2021
@dmitshur dmitshur added this to the Go1.16 milestone Feb 16, 2021
@dmitshur
Copy link
Contributor

CC @mknyszek.

@golang golang locked and limited conversation to collaborators Feb 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants