Skip to content

Commit

Permalink
Not sanitizing dots in metrics names (#32)
Browse files Browse the repository at this point in the history
* feat: not sanitizing strings for metrics

* feat: not sanitizing dots in metrics names

---------

Co-authored-by: Iusupov Anton <yusupovanton@outlook.com>
  • Loading branch information
antoniusupov and Iusupov Anton authored Aug 3, 2024
1 parent 91cb12c commit 7bb390b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewRegistry(subsystem, namespace string) Registry {
}

func (r *registry) sanitizeMetricName(name string) string {
return strings.ReplaceAll(strings.ReplaceAll(name, ".", "_"), "-", "_")
return strings.ReplaceAll(name, "-", "_")
}

func (r *registry) Inc(name string) {
Expand Down

0 comments on commit 7bb390b

Please sign in to comment.