diff options
Diffstat (limited to 'kamon-core-tests/src/test/scala')
-rw-r--r-- | kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala | 2 | ||||
-rw-r--r-- | kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala b/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala index 5d636d16..21ad93b3 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala @@ -32,6 +32,8 @@ class LocalSpanSpec extends WordSpec with Matchers with BeforeAndAfterAll with E Kamon.buildSpan("test-span") .withTag("test", "value") .withStartTimestamp(100) + .disableMetrics() + .enableMetrics() .start() .finish(200) diff --git a/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala b/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala index ea29d92e..2a04024c 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala @@ -42,13 +42,18 @@ class SpanMetrics extends WordSpecLike with Matchers with MetricInspection with } - "not be recorded when disableMetrics() is called on the Span" in { + "not be recorded when disableMetrics() is called on the SpanBuilder or the Span" in { val operation = "span-with-disabled-metrics" buildSpan(operation) .start() .disableMetrics() .finish() + buildSpan(operation) + .disableMetrics() + .start() + .finish() + Span.Metrics.ProcessingTime.valuesForTag("operation") shouldNot contain(operation) } |