Documentation
¶
Overview ¶
Package metrics holds the adapters that query a metrics backing service (an installed or connected add-on) for the agent's metrics-query path (ADR-0026).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromQL ¶
type PromQL struct {
// contains filtered or unexported fields
}
PromQL queries a Prometheus-HTTP-API-compatible metrics store over its instant-query API. Burrow connects to an existing store the user already runs and queries it — it never distributes the store (ADR-0026). Prometheus and VictoriaMetrics share the same /api/v1/query API, so this one adapter serves both. The store's in-cluster endpoint (host:port) is passed per query, along with an optional bearer token for an authenticated store.
func (PromQL) QueryMetrics ¶
func (p PromQL) QueryMetrics(ctx context.Context, endpoint, query, token string) ([]controlplane.MetricSample, error)
QueryMetrics runs an instant PromQL query against the store at endpoint and returns the matching samples. A non-empty token is sent as an Authorization: Bearer header for an authenticated store. A vector result yields one MetricSample per series (labels from metric, value and timestamp from the value pair); a scalar result yields a single MetricSample with no labels.