Skip to main content

validate_user_metric_sink_prefix

Function validate_user_metric_sink_prefix 

Source
pub fn validate_user_metric_sink_prefix(prefix: &str) -> Result<(), PlanError>
Expand description

validate_metric_sink_prefix plus the reservation that keeps user sinks clear of the curated families (METRIC_SINK_CURATED_PREFIX_MARKER).

The check runs both ways so it is total: a prefix that starts with the curated prefix is rejected, and so is one the curated prefix starts with (a bare mz_metric_sink_ plus a curated_... row would otherwise publish a curated family, which Prometheus merges silently). It is static rather than a catalog scan like Coordinator::ensure_metric_sink_prefix_is_free, because curated sinks are not catalog items.