diff --git a/jaeger-zipkin/build.gradle b/jaeger-zipkin/build.gradle index 487852f31..f9984fc3b 100644 --- a/jaeger-zipkin/build.gradle +++ b/jaeger-zipkin/build.gradle @@ -4,14 +4,14 @@ apply plugin: 'com.github.kt3k.coveralls' description = 'Integration library for Zipkin' dependencies { - compile group: 'io.zipkin.reporter', name: 'zipkin-reporter', version: '0.4.2' - compile group: 'io.zipkin.reporter', name: 'zipkin-sender-urlconnection', version: '0.4.2' + compile group: 'io.zipkin.reporter', name: 'zipkin-reporter', version: '0.4.4' + compile group: 'io.zipkin.reporter', name: 'zipkin-sender-urlconnection', version: '0.4.4' compile project(':jaeger-core') testCompile group: 'junit', name: 'junit', version: junitVersion testCompile group: 'org.mockito', name: 'mockito-all', version: mockitoVersion - testCompile group: 'io.zipkin.java', name: 'zipkin-junit', version: '1.8.3' - testCompile group: 'io.zipkin.brave', name: 'brave-http', version: '3.10.0' + testCompile group: 'io.zipkin.java', name: 'zipkin-junit', version: '1.11.1' + testCompile group: 'io.zipkin.brave', name: 'brave-http', version: '3.11.0' } jacocoTestReport { diff --git a/jaeger-zipkin/src/test/java/com/uber/jaeger/propagation/b3/B3TextMapCodecTest.java b/jaeger-zipkin/src/test/java/com/uber/jaeger/propagation/b3/B3TextMapCodecTest.java index 798b502e0..706e7692a 100644 --- a/jaeger-zipkin/src/test/java/com/uber/jaeger/propagation/b3/B3TextMapCodecTest.java +++ b/jaeger-zipkin/src/test/java/com/uber/jaeger/propagation/b3/B3TextMapCodecTest.java @@ -32,7 +32,10 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; +import zipkin.internal.Util; +import static com.uber.jaeger.propagation.b3.B3TextMapCodec.SPAN_ID_NAME; +import static com.uber.jaeger.propagation.b3.B3TextMapCodec.TRACE_ID_NAME; import static org.junit.Assert.assertEquals; public class B3TextMapCodecTest { @@ -53,6 +56,21 @@ public void testExtract_rootSpan() throws Exception { assertEquals(1, context.getFlags()); // sampled } + @Test + public void downgrades128BitTraceIdToLower64Bits() throws Exception { + String hex128Bits = "463ac35c9f6413ad48485a3953bb6124"; + String lower64Bits = "48485a3953bb6124"; + + DelegatingTextMap textMap = new DelegatingTextMap(); + textMap.put(TRACE_ID_NAME, hex128Bits); + textMap.put(SPAN_ID_NAME, lower64Bits); + + SpanContext context = b3Codec.extract(textMap); + + assertEquals(Util.lowerHexToUnsignedLong(lower64Bits), context.getTraceID()); + assertEquals(Util.lowerHexToUnsignedLong(lower64Bits), context.getSpanID()); + } + @Test public void testExtract_childSpan() throws Exception { SpanId spanId = SpanId.builder().spanId(2L).traceId(1L).parentId(1L).build();