Skip to content

Commit

Permalink
Merge e118d5e into 2640a6b
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov authored Sep 19, 2023
2 parents 2640a6b + e118d5e commit 6b37dff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/tests/cmd_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ func TestMetricNameWarning(t *testing.T) {
t.Log(stdout)

logEntries := ts.LoggerHook.Drain()
expectedMsg := `Metric name should only include ASCII letters, numbers and underscores. This name will stop working in `
expectedMsg := `Metric name should only include up to 128 ASCII letters, numbers and/or underscores.`
filteredEntries := testutils.FilterEntries(logEntries, logrus.WarnLevel, expectedMsg)
require.Len(t, filteredEntries, 2)
// we do it this way as ordering is not guaranteed
Expand Down
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 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 6b37dff

Please sign in to comment.