diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-07-10 08:57:00 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-07-10 08:57:00 +0200 |
commit | 52c4503b6aea2309feeb550b7db2e5fa627dedc8 (patch) | |
tree | c63f6552f4efd716cb1cebff2a952e846c7bd869 /kamon-core/src | |
parent | 3d35058fb76e34ef3218310d0762e37c0f5f4d09 (diff) | |
download | Kamon-52c4503b6aea2309feeb550b7db2e5fa627dedc8.tar.gz Kamon-52c4503b6aea2309feeb550b7db2e5fa627dedc8.tar.bz2 Kamon-52c4503b6aea2309feeb550b7db2e5fa627dedc8.zip |
start counting errors when Spans are finished
Diffstat (limited to 'kamon-core/src')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/Span.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/Span.scala b/kamon-core/src/main/scala/kamon/trace/Span.scala index 04b8eaf3..8149be74 100644 --- a/kamon-core/src/main/scala/kamon/trace/Span.scala +++ b/kamon-core/src/main/scala/kamon/trace/Span.scala @@ -158,7 +158,7 @@ class Span(spanContext: SpanContext, initialOperationName: String, initialTags: tags.get("error").foreach { errorTag => if(errorTag != null && errorTag.equals(Span.BooleanTagTrueValue)) { - //TODO: count properly metrics.counter("span.errors", MeasurementUnit.none, metricTags).increment() + Span.Metrics.SpanErrorCount.refine(metricTags).increment() } } } @@ -167,6 +167,7 @@ class Span(spanContext: SpanContext, initialOperationName: String, initialTags: object Span { object Metrics { val SpanProcessingTimeMetric = Kamon.histogram("span.processing-time", MeasurementUnit.time.microseconds) + val SpanErrorCount = Kamon.counter("span.error-count") } val MetricTagPrefix = "metric." |