Skip to main content

plan_create_metric_sink

Function plan_create_metric_sink 

Source
pub fn plan_create_metric_sink(
    scx: &StatementContext<'_>,
    stmt: CreateMetricSinkStatement<Aug>,
) -> Result<Plan, PlanError>
Expand description

Plans a metric sink over stmt.from, which must expose the columns in METRIC_SINK_SOURCE_COLUMNS.

Every distinct (metric_name, labels) becomes its own Prometheus series, so high-cardinality labels mean a lot of series. A null value is a gap in the exposition rather than a zero, and the series stays missing until a non-null value shows up for that same key. Use coalesce(value, 0) if you want zeroes instead.