diff options
Diffstat (limited to 'kamon-core-tests/src')
3 files changed, 19 insertions, 22 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 f6bd3517..966fdbad 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/LocalSpanSpec.scala @@ -30,7 +30,7 @@ class LocalSpanSpec extends WordSpec with Matchers with BeforeAndAfterAll with E "sampled and finished" should { "be sent to the Span reporters" in { Kamon.buildSpan("test-span") - .withSpanTag("test", "value") + .withTag("test", "value") .withStartTimestamp(100) .start() .finish(200) @@ -46,16 +46,16 @@ class LocalSpanSpec extends WordSpec with Matchers with BeforeAndAfterAll with E "pass all the tags, annotations and baggage to the FinishedSpan instance when started and finished" in { Kamon.buildSpan("full-span") - .withSpanTag("builder-string-tag", "value") - .withSpanTag("builder-boolean-tag-true", true) - .withSpanTag("builder-boolean-tag-false", false) - .withSpanTag("builder-number-tag", 42) + .withTag("builder-string-tag", "value") + .withTag("builder-boolean-tag-true", true) + .withTag("builder-boolean-tag-false", false) + .withTag("builder-number-tag", 42) .withStartTimestamp(100) .start() - .addSpanTag("span-string-tag", "value") - .addSpanTag("span-boolean-tag-true", true) - .addSpanTag("span-boolean-tag-false", false) - .addSpanTag("span-number-tag", 42) + .addTag("span-string-tag", "value") + .addTag("span-boolean-tag-true", true) + .addTag("span-boolean-tag-false", false) + .addTag("span-number-tag", 42) .setOperationName("fully-populated-span") .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 dd777490..40813a25 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala @@ -46,7 +46,7 @@ class SpanMetrics extends WordSpecLike with Matchers with MetricInspection with buildSpan(operation) .start() - .addSpanTag("error", true) + .addTag("error", true) .finish() val histogram = Span.Metrics.ProcessingTime.refine(Map(operationTag, noErrorTag)) @@ -66,13 +66,13 @@ class SpanMetrics extends WordSpecLike with Matchers with MetricInspection with buildSpan(operation) .asChildOf(parent) .start() - .addSpanTag("error", false) + .addTag("error", false) .finish() buildSpan(operation) .asChildOf(parent) .start() - .addSpanTag("error", true) + .addTag("error", true) .finish() val histogram = Span.Metrics.ProcessingTime.refine(Map(operationTag, noErrorTag, parentOperationTag)) @@ -92,13 +92,13 @@ class SpanMetrics extends WordSpecLike with Matchers with MetricInspection with buildSpan(operation) .asChildOf(parent) .start() - .addSpanTag("error", false) + .addTag("error", false) .finish() buildSpan(operation) .asChildOf(parent) .start() - .addSpanTag("error", true) + .addTag("error", true) .finish() val histogram = Span.Metrics.ProcessingTime.refine(Map(operationTag, noErrorTag, parentOperationTag)) diff --git a/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala b/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala index a08277ea..92431470 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala @@ -36,23 +36,20 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with SpanInspe "pass the operation name and tags to started Span" in { val span = tracer.buildSpan("myOperation") - .withTag("both", "both") .withMetricTag("metric-tag", "value") .withMetricTag("metric-tag", "value") - .withSpanTag("hello", "world") - .withSpanTag("kamon", "rulez") - .withSpanTag("number", 123) - .withSpanTag("boolean", true) + .withTag("hello", "world") + .withTag("kamon", "rulez") + .withTag("number", 123) + .withTag("boolean", true) .start() val spanData = inspect(span) spanData.operationName() shouldBe "myOperation" spanData.metricTags() should contain only ( - ("metric-tag" -> "value"), - ("both" -> "both")) + ("metric-tag" -> "value")) spanData.spanTags() should contain allOf( - ("both" -> TagValue.String("both")), ("hello" -> TagValue.String("world")), ("kamon" -> TagValue.String("rulez")), ("number" -> TagValue.Number(123)), |