allow dot in metric name (#26)
This commit is contained in:
parent
bfa3fbc1a7
commit
1aa57265d4
@ -81,4 +81,4 @@ func validateIdent(s string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var identRegexp = regexp.MustCompile("^[a-zA-Z_:][a-zA-Z0-9_:]*$")
|
||||
var identRegexp = regexp.MustCompile("^[a-zA-Z_:.][a-zA-Z0-9_:.]*$")
|
||||
|
@ -18,6 +18,7 @@ func TestValidateMetricSuccess(t *testing.T) {
|
||||
f(`foo{bar="baz", x="y\"z"}`)
|
||||
f(`foo{bar="b}az"}`)
|
||||
f(`:foo:bar{bar="a",baz="b"}`)
|
||||
f(`some.foo{bar="baz"}`)
|
||||
}
|
||||
|
||||
func TestValidateMetricError(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user