sdk/golang/Standard Library/GoRuntimeMetrics
Standard Library

GoRuntimeMetrics

Go stdlib package — runtime/metrics. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.All()Neutral
#
Signature
All() []Description

All returns a slice of containing metric descriptions for all supported metrics.

.Read()Neutral
#
Signature
Read(m []Sample)

Read populates each Value field in the given slice of metric samples.

.Value.Float64()Neutral
#
Signature
Value.Float64() float64

Float64 returns the internal float64 value for the metric.

.Value.Float64Histogram()Neutral
#
Signature
Value.Float64Histogram() *Float64Histogram

Float64Histogram returns the internal *Float64Histogram value for the metric.

.Value.Kind()Neutral
#
Signature
Value.Kind() ValueKind

Kind returns the tag representing the kind of value this is.

.Value.Uint64()Neutral
#
Signature
Value.Uint64() uint64

Uint64 returns the internal uint64 value for the metric.

.Description()Neutral
#
Signature
type Description ...

Description describes a runtime metric.

.Float64Histogram()Neutral
#
Signature
type Float64Histogram ...

Float64Histogram represents a distribution of float64 values.

.Sample()Neutral
#
Signature
type Sample ...

Sample captures a single metric sample.

.Value()Neutral
#
Signature
type Value ...

Value represents a metric value returned by the runtime.

Fully-Qualified Names

FQNField
runtime/metricsfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # runtime/metrics