Skip to content

Commit

Permalink
Allow single-letter components in metric names
Browse files Browse the repository at this point in the history
They are valid. Fixes #256.

Signed-off-by: Matthias Rampke <[email protected]>
  • Loading branch information
matthiasr committed May 29, 2020
1 parent bd5e04d commit 1f35afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

var (
statsdMetricRE = `[a-zA-Z_](-?[a-zA-Z0-9_])+`
statsdMetricRE = `[a-zA-Z_](-?[a-zA-Z0-9_])*`
templateReplaceRE = `(\$\{?\d+\}?)`

metricLineRE = regexp.MustCompile(`^(\*\.|` + statsdMetricRE + `\.)+(\*|` + statsdMetricRE + `)$`)
Expand Down

0 comments on commit 1f35afd

Please sign in to comment.