diff options
author | Shohet <uri.shohet@intel.com> | 2016-03-20 13:56:15 +0200 |
---|---|---|
committer | Shohet <uri.shohet@intel.com> | 2016-03-20 13:56:15 +0200 |
commit | 34cd2a00cc112d72f1d3a53eafa86ab90abc48a6 (patch) | |
tree | 902bbdb45f9d235e6dc95551f706dd3e92268efc | |
parent | 71e777ebec4f244f5233788fd8af2e062cf14f24 (diff) | |
download | Kamon-34cd2a00cc112d72f1d3a53eafa86ab90abc48a6.tar.gz Kamon-34cd2a00cc112d72f1d3a53eafa86ab90abc48a6.tar.bz2 Kamon-34cd2a00cc112d72f1d3a53eafa86ab90abc48a6.zip |
in "normalize" strategy - replace ":" with "-", instead of ": " with "-"
Remote actors paths look like
akka.tcp://ActorSystemName@Slavehost1:2551/remote/akka.tcp/ActorSystemName@Masterhost:2551/user/master/myRouter/c10
Before the change the remote actor's metrics didn't get through because
the ':' after the Masterhost and everything that followed it was cut off.
A metric name in grafana would look like
ActorSystemName.slavehost1.akka-actor.ActorSystemName_remote_akka_tcp_ActorSystemNameMasterhostIP,
now it looks like
ActorSystemName.slavehost1.akka-actor.ActorSystemName_remote_akka_tcp_ActorSystemNameMasterhostIP-2551_user_master_myRouter_c4.errors
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/SimpleMetricKeyGenerator.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-statsd/src/main/scala/kamon/statsd/SimpleMetricKeyGenerator.scala b/kamon-statsd/src/main/scala/kamon/statsd/SimpleMetricKeyGenerator.scala index c4d8682a..57f1db1a 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/SimpleMetricKeyGenerator.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/SimpleMetricKeyGenerator.scala @@ -58,7 +58,7 @@ class SimpleMetricKeyGenerator(config: Config) extends MetricKeyGenerator { def createNormalizer(strategy: String): Normalizer = strategy match { case "percent-encode" ⇒ PercentEncoder.encode - case "normalize" ⇒ (s: String) ⇒ s.replace(": ", "-").replace(" ", "_").replace("/", "_").replace(".", "_") + case "normalize" ⇒ (s: String) ⇒ s.replace(":", "-").replace(" ", "_").replace("/", "_").replace(".", "_") } } |