Skip to content

Commit

Permalink
enable utf-8 validation mode by default
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Williams <[email protected]>
  • Loading branch information
ywwg committed Aug 21, 2024
1 parent 8968b6c commit 517feb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions model/alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func TestAlertValidate(t *testing.T) {
},
}

NameValidationScheme = LegacyValidation

for i, c := range cases {
err := c.alert.Validate()
if err == nil {
Expand Down
2 changes: 1 addition & 1 deletion model/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
// UTF-8-aware binaries as part of their startup. To avoid need for locking,
// this value should be set once, ideally in an init(), before multiple
// goroutines are started.
NameValidationScheme = LegacyValidation
NameValidationScheme = UTF8Validation

// NameEscapingScheme defines the default way that names will be
// escaped when presented to systems that do not support UTF-8 names. If the
Expand Down

0 comments on commit 517feb8

Please sign in to comment.