Skip to content

Commit 5dbe976

Browse files
committed
reverting irrelevant changes
1 parent 8bef8d0 commit 5dbe976

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,7 @@ public DDSpanContext(
367367
propagationTags != null
368368
? propagationTags
369369
: traceCollector.getTracer().getPropagationTagsFactory().empty();
370-
if (parentId == 0) { // higher bits of traceID are only used in root span
371-
this.propagationTags.updateTraceIdHighOrderBits(this.traceId.toHighOrderLong());
372-
}
370+
this.propagationTags.updateTraceIdHighOrderBits(this.traceId.toHighOrderLong());
373371
this.injectBaggageAsTags = injectBaggageAsTags;
374372
if (origin != null) {
375373
setOrigin(origin);

dd-trace-core/src/test/groovy/datadog/trace/core/DDSpanContextTest.groovy

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -286,24 +286,6 @@ class DDSpanContextTest extends DDCoreSpecification {
286286
span.context.encodedResourceName == -2
287287
}
288288

289-
def "higher order bits of 128bit traceID is only set as PTag in root span"() {
290-
when:
291-
def parent = tracer.buildSpan("fakeOperation")
292-
.withServiceName("fakeService")
293-
.withResourceName("fakeResource")
294-
.start()
295-
296-
def child = tracer.buildSpan("fakeOperation")
297-
.withServiceName("fakeService")
298-
.withResourceName("fakeResource")
299-
.asChildOf(parent)
300-
.start()
301-
302-
then:
303-
parent.context().getPropagationTags().getTraceIdHighOrderBits() != 0
304-
// child.context().getPropagationTags().getTraceIdHighOrderBits() == 0
305-
}
306-
307289
private static String dataTag(String tag) {
308290
"_dd.${tag}.json"
309291
}

0 commit comments

Comments
 (0)