aboutsummaryrefslogtreecommitdiff
path: root/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2019-04-01 13:26:18 +0200
committerGitHub <noreply@github.com>2019-04-01 13:26:18 +0200
commit45237e2977d38053ddedc35765a901cf8771c106 (patch)
tree4c8ce6da2630dc92dc9f2b4d440b206177a4ab89 /kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala
parent8efb3b408a876a3dfdac79580773279125cb4135 (diff)
parent2392fb02c3259d7f0b41ff410641accd818bc5d4 (diff)
downloadKamon-master.tar.gz
Kamon-master.tar.bz2
Kamon-master.zip
Merge pull request #572 from ivantopo/tagsHEADmaster
Introduce a common abstractions to handle tags
Diffstat (limited to 'kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala')
-rw-r--r--kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala13
1 files changed, 5 insertions, 8 deletions
diff --git a/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala b/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala
index 62eae45b..c7e856d0 100644
--- a/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala
+++ b/kamon-core-tests/src/test/scala/kamon/instrumentation/HttpServerInstrumentationSpec.scala
@@ -4,6 +4,7 @@ import java.time.Duration
import kamon.context.Context
import kamon.metric.{Counter, Histogram, RangeSampler}
+import kamon.tag.Lookups._
import kamon.testkit.{MetricInspection, SpanInspection}
import org.scalatest.concurrent.Eventually
import org.scalatest.{Matchers, OptionValues, WordSpec}
@@ -20,10 +21,8 @@ class HttpServerInstrumentationSpec extends WordSpec with Matchers with SpanInsp
"custom-trace-id" -> "0011223344556677"
)))
- handler.context.tags should contain only(
- "tag" -> "value",
- "none" -> "0011223344556677"
- )
+ handler.context.tags.get(plain("tag")) shouldBe "value"
+ handler.context.tags.get(plain("none")) shouldBe "0011223344556677"
handler.send(fakeResponse(200, mutable.Map.empty), Context.Empty)
handler.doneSending(0L)
@@ -35,10 +34,8 @@ class HttpServerInstrumentationSpec extends WordSpec with Matchers with SpanInsp
"custom-trace-id" -> "0011223344556677"
)))
- handler.context.tags should contain only(
- "tag" -> "value",
- "none" -> "0011223344556677"
- )
+ handler.context.tags.get(plain("tag")) shouldBe "value"
+ handler.context.tags.get(plain("none")) shouldBe "0011223344556677"
val span = inspect(handler.span)
span.context().traceID.string shouldNot be("0011223344556677")