From 8aa1c8f3966cee0bbf94110425cf404a680f228e Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Wed, 20 Sep 2023 16:43:00 +0300 Subject: [PATCH] Comment on naming restrictions --- js/bundle.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/bundle.go b/js/bundle.go index a32a9ca6dcf..b25e2e46f58 100644 --- a/js/bundle.go +++ b/js/bundle.go @@ -46,6 +46,8 @@ type Bundle struct { // https://github.com/grafana/k6/issues/3065 func (b *Bundle) checkMetricNamesForPrometheusCompatibility() { const ( + // The name restrictions are the union of Otel and Prometheus naming restrictions, with the length restrictions of 128 + // coming from old k6 restrictions where character set was way bigger though. nameRegexString = "^[a-zA-Z_][a-zA-Z0-9_]{1,128}$" badNameWarning = "Metric name should only include up to 128 ASCII letters, numbers and/or underscores. " + "This name will stop working in k6 v0.48.0 (around December 2023)."