Skip to content

Commit

Permalink
Hotfix prometheus_client_model to avoid dual global initializations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Skillington committed May 17, 2018
1 parent 51e5c45 commit 1ce146c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import:
subpackages:
- prometheus
- package: github.com/m3db/prometheus_client_model
version: fa8ad6fec33561be4280a8f0514318c79d7f6cb6
version: 8b2299a4bf7d7fc10835527021716d4b4a6e8700
- package: github.com/m3db/prometheus_common
version: 25aaa3dff79bb48116615ebe1dea6a494b74ce77
- package: github.com/m3db/prometheus_procfs
Expand Down
6 changes: 3 additions & 3 deletions prometheus/sanitize.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ var (
DefaultSanitizerOpts = tally.SanitizeOptions{
NameCharacters: tally.ValidCharacters{
Ranges: tally.AlphanumericRange,
Characters: tally.UnderscoreDashCharacters,
Characters: tally.UnderscoreCharacters,
},
KeyCharacters: tally.ValidCharacters{
Ranges: tally.AlphanumericRange,
Characters: tally.UnderscoreDashCharacters,
Characters: tally.UnderscoreCharacters,
},
ValueCharacters: tally.ValidCharacters{
Ranges: tally.AlphanumericRange,
Characters: tally.UnderscoreDashCharacters,
Characters: tally.UnderscoreCharacters,
},
ReplacementCharacter: tally.DefaultReplacementCharacter,
}
Expand Down
4 changes: 4 additions & 0 deletions sanitize.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ var (
{rune('A'), rune('Z')},
{rune('0'), rune('9')}}

// UnderscoreCharacters is just an underscore character.
UnderscoreCharacters = []rune{
'_'}

// UnderscoreDashCharacters is a slice of underscore, and
// dash characters.
UnderscoreDashCharacters = []rune{
Expand Down

0 comments on commit 1ce146c

Please sign in to comment.