diff options
Diffstat (limited to 'kamon-statsd/src/main')
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/Statsd.scala | 2 | ||||
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/StatsdMetricsSender.scala | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/kamon-statsd/src/main/scala/kamon/statsd/Statsd.scala b/kamon-statsd/src/main/scala/kamon/statsd/Statsd.scala index 786e518b..a3ca910c 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/Statsd.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/Statsd.scala @@ -47,7 +47,7 @@ class StatsdMetricsListener(host: String, port: Int, prefix: String) extends Act val statsdActor = context.actorOf(StatsdMetricsSender.props(prefix, new InetSocketAddress(InetAddress.getByName(host), port)), "statsd-metrics-sender") val translator = context.actorOf(StatsdMetricTranslator.props(statsdActor), "statsd-metrics-translator") - val buffer = context.actorOf(TickMetricSnapshotBuffer.props(1 minute, translator), "metrics-buffer") + val buffer = context.actorOf(TickMetricSnapshotBuffer.props(1 minute, translator), "statsd-metrics-buffer") def receive = { case tick: TickMetricSnapshot ⇒ statsdActor.forward(tick) diff --git a/kamon-statsd/src/main/scala/kamon/statsd/StatsdMetricsSender.scala b/kamon-statsd/src/main/scala/kamon/statsd/StatsdMetricsSender.scala index 9898a6e8..c540ad69 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/StatsdMetricsSender.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/StatsdMetricsSender.scala @@ -43,6 +43,7 @@ class StatsdMetricsSender(statPrefix: String, remote: InetSocketAddress) extends object StatsdMetricsSender { sealed trait StatsdMetric + case class Counter(key: String, value: Long = 1, suffix: String = "c", samplingRate: Double = 1.0) extends StatsdMetric case class Timing(key: String, millis: Long, suffix: String = "ms", samplingRate: Double = 1.0) extends StatsdMetric case class Gauge(key: String, value: Long, suffix: String = "g", samplingRate: Double = 1.0) extends StatsdMetric @@ -63,8 +64,8 @@ object StatsdMetricsSender { */ private[this] def statFor(statPrefix: String, key: String, value: Long, suffix: String, samplingRate: Double): ByteString = { samplingRate match { - case x if x >= 1.0 ⇒ ByteString(s"${statPrefix}.${key}:${value}|$suffix") - case _ ⇒ ByteString(s"${statPrefix}.${key}:${value}|${suffix}|@$samplingRate") + case x if x >= 1.0 ⇒ ByteString(s"$statPrefix.$key:$value|$suffix") + case _ ⇒ ByteString(s"$statPrefix.$key:$value|$suffix|@$samplingRate") } } }
\ No newline at end of file |