Skip to content

Commit

Permalink
Comment on naming restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Sep 20, 2023
1 parent cd58512 commit 8aa1c8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down

0 comments on commit 8aa1c8f

Please sign in to comment.