Skip to content

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

@zephyrtronium

Description

@zephyrtronium

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?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions