Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
'@' and '~' are not supported by Librato as tag values
Browse files Browse the repository at this point in the history
  • Loading branch information
mavilein committed Feb 13, 2018
1 parent f38184f commit d9ed0e7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ case class CustomTag(name: String, recordingThreshold: Long = 0) {
* This is mostly interesting for timings right now to reduce noise in custom dimensions.
*/
def apply(recordedValue: Long, tagValue: String): String = {
val sanitizedValue = tagValue.replace('@', '-').replace('~', '-')
if (recordedValue >= recordingThreshold) {
s"$name=$tagValue"
s"$name=$sanitizedValue"
} else {
s"$name=-"
}
Expand Down

0 comments on commit d9ed0e7

Please sign in to comment.