Skip to content

Commit

Permalink
Bump future metric name length to 128
Browse files Browse the repository at this point in the history
This is inline with the current restriction.

The previous 63 character one came from Otel, but with
open-telemetry/opentelemetry-specification#3648
This has been bumped to 255.

Updates #3065
  • Loading branch information
mstoykov committed Sep 18, 2023
1 parent 981b770 commit b8fa5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ type Bundle struct {
// https://github.com/grafana/k6/issues/3065
func (b *Bundle) checkMetricNamesForPrometheusCompatibility() {
const (
nameRegexString = "^[a-zA-Z_][a-zA-Z0-9_]{1,63}$"
badNameWarning = "Metric name should only include ASCII letters, numbers and underscores. " +
nameRegexString = "^[a-zA-Z_][a-zA-Z0-9_]{1,128}$"
badNameWarning = "Metric name should only include upto 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 b8fa5f7

Please sign in to comment.