diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-20 14:06:03 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-20 14:06:03 +0200 |
commit | e1e7853255131f26702229735e37e160c38f2d08 (patch) | |
tree | 98202bb2b62a9c0dd29d0fb7f020da232703844a /kamon-core/src/main/scala/kamon/trace/Span.scala | |
parent | 77f2666650726352a9e15dcf6019064d91393b2e (diff) | |
download | Kamon-e1e7853255131f26702229735e37e160c38f2d08.tar.gz Kamon-e1e7853255131f26702229735e37e160c38f2d08.tar.bz2 Kamon-e1e7853255131f26702229735e37e160c38f2d08.zip |
implement entity filters
Diffstat (limited to 'kamon-core/src/main/scala/kamon/trace/Span.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/Span.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/Span.scala b/kamon-core/src/main/scala/kamon/trace/Span.scala index 87115e19..804627dc 100644 --- a/kamon-core/src/main/scala/kamon/trace/Span.scala +++ b/kamon-core/src/main/scala/kamon/trace/Span.scala @@ -1,7 +1,7 @@ package kamon package trace -import kamon.metric.RecorderRegistry +import kamon.metric.{Entity, RecorderRegistry} import kamon.metric.instrument.DynamicRange import scala.collection.JavaConverters._ @@ -167,7 +167,8 @@ class Span(spanContext: SpanContext, initialOperationName: String, startTimestam private def recordSpanMetrics(): Unit = { val elapsedTime = endTimestampMicros - startTimestampMicros - val recorder = recorderRegistry.getRecorder(operationName, Span.MetricCategory, metricTags) + val entity = Entity(operationName, Span.MetricCategory, metricTags) + val recorder = recorderRegistry.getRecorder(entity) recorder .histogram(Span.LatencyMetricName, MeasurementUnit.time.microseconds, DynamicRange.Default) @@ -178,6 +179,5 @@ class Span(spanContext: SpanContext, initialOperationName: String, startTimestam recorder.counter(Span.ErrorMetricName).increment() } } - } }
\ No newline at end of file |