diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-02-02 23:18:54 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-02-02 23:18:54 -0300 |
commit | fdc0e75fdaa0ec8ff1642d9c717d764b92f5d112 (patch) | |
tree | 0e03fb08928f52ade69ee568d0f13dc6c5f7c0b5 /kamon-core/src/main/scala/kamon/metrics | |
parent | d2f43e874f867afab55e0e76f1edd89faff85953 (diff) | |
download | Kamon-fdc0e75fdaa0ec8ff1642d9c717d764b92f5d112.tar.gz Kamon-fdc0e75fdaa0ec8ff1642d9c717d764b92f5d112.tar.bz2 Kamon-fdc0e75fdaa0ec8ff1642d9c717d764b92f5d112.zip |
add tags to individual metrics
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metrics')
3 files changed, 6 insertions, 7 deletions
diff --git a/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala b/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala index e588449e..66d3f888 100644 --- a/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala +++ b/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala @@ -23,9 +23,9 @@ object ActorMetrics extends MetricGroupIdentity.Category with MetricGroupFactory type GroupRecorder = ActorMetricRecorder val entityName = "actor" - case object ProcessingTime extends MetricIdentity { val name = "ProcessingTime" } - case object MailboxSize extends MetricIdentity { val name = "MailboxSize" } - case object TimeInMailbox extends MetricIdentity { val name = "TimeInMailbox" } + case object ProcessingTime extends MetricIdentity { val name, tag = "ProcessingTime" } + case object MailboxSize extends MetricIdentity { val name, tag = "MailboxSize" } + case object TimeInMailbox extends MetricIdentity { val name, tag = "TimeInMailbox" } case class ActorMetricRecorder(processingTime: MetricRecorder, mailboxSize: MetricRecorder, timeInMailbox: MetricRecorder) extends MetricGroupRecorder { diff --git a/kamon-core/src/main/scala/kamon/metrics/Metrics.scala b/kamon-core/src/main/scala/kamon/metrics/Metrics.scala index a3d7af87..2a9c5c65 100644 --- a/kamon-core/src/main/scala/kamon/metrics/Metrics.scala +++ b/kamon-core/src/main/scala/kamon/metrics/Metrics.scala @@ -24,6 +24,7 @@ case class MetricGroupIdentity(name: String, category: MetricGroupIdentity.Categ trait MetricIdentity { def name: String + def tag: String } trait MetricGroupRecorder { diff --git a/kamon-core/src/main/scala/kamon/metrics/TraceMetrics.scala b/kamon-core/src/main/scala/kamon/metrics/TraceMetrics.scala index 57a79653..66801481 100644 --- a/kamon-core/src/main/scala/kamon/metrics/TraceMetrics.scala +++ b/kamon-core/src/main/scala/kamon/metrics/TraceMetrics.scala @@ -24,11 +24,9 @@ object TraceMetrics extends MetricGroupIdentity.Category with MetricGroupFactory type GroupRecorder = TraceMetricRecorder val entityName = "trace" - case object ElapsedTime extends MetricIdentity { - val name = "ElapsedTime" - } + case object ElapsedTime extends MetricIdentity { val name, tag = "ElapsedTime" } - case class HttpClientRequest(name: String) extends MetricIdentity + case class HttpClientRequest(name: String, tag: String) extends MetricIdentity class TraceMetricRecorder(val elapsedTime: HighDynamicRangeRecorder, private val segmentRecorderFactory: () ⇒ HighDynamicRangeRecorder) extends MetricGroupRecorder { |