File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
core/src/test/scala/brave/play Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11/**
2- * Copyright 2017-2020 The OpenZipkin Authors
2+ * Copyright 2017-2021 The OpenZipkin Authors
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55 * in compliance with the License. You may obtain a copy of the License at
@@ -114,6 +114,14 @@ class ZipkinTraceServiceLikeSpec extends FunSuite {
114114 assert(reported.tags.get(" tag" ) === " value" )
115115 }
116116
117+ test(" when sampling is disabled, toSpan results in a new unsampled trace" ) {
118+ val tracer = new TestZipkinTraceService ()
119+
120+ val parent = tracer.toSpan(Map (" X-B3-Sampled" -> " 0" ))(getValueFromMap)
121+
122+ assert(parent.context().parentId() == null )
123+ assert(parent.context().sampled() == false )
124+ }
117125}
118126
119127class TestZipkinTraceService extends ZipkinTraceServiceLike {
You can’t perform that action at this time.
0 commit comments