Skip to content

pkgs/store/metrics

pkgs/store/metrics Provides time-series sample writing and query abstractions. GizClaw uses it to save Peer telemetry and perform instant query, range query and aggregation through Server/Admin surface.

Go API References

Core structure and implementation

SymbolFunction
StoreDefine sample writing, instant query and range query.
Sample / Point / Series / SeriesSetExpress input sample and query results.
Selector / LabelMatcherDescribe metric name and label filtering.
Query / RangeQueryDescribe the query time, time interval, step and expression.
Aggregation / AggregateExpressionConstructs a supported aggregate expression.
MemoryStoreProvides in-process time-series implementation.
PrometheusStoreWrite and query metrics through Prometheus-compatible API.
ValidateMetricName / ValidateLabelNameVerify metric and label contract.

Ownership Boundary

The Metrics package does not own the GizClaw telemetry event schema. The mapping of Telemetry packet to metric name, labels and sample value belongs to services/runtime/peertelemetry. The caller is responsible for controlling label cardinality, identity exposure, and query authorization.