@Test protected void getDependencies_linksMixedTraceId(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    String traceId = newTraceId();

    Endpoint frontend = suffixServiceName(TestObjects.FRONTEND, testSuffix);
    Endpoint backend = suffixServiceName(TestObjects.BACKEND, testSuffix);

    List<Span> mixedTrace = List.of(
      Span.newBuilder().traceId(traceId).id("1").name("get")
        .kind(Kind.SERVER)
        .timestamp(TODAY * 1000L)
        .duration(350 * 1000L)
        .localEndpoint(frontend)
        .build(),
      // the server dropped traceIdHigh
      Span.newBuilder().traceId(traceId.substring(16)).parentId("1").id("2").name("get")
        .kind(Kind.SERVER).shared(true)
        .timestamp((TODAY + 100) * 1000L)
        .duration(250 * 1000L)
        .localEndpoint(backend)
        .build(),
      Span.newBuilder().traceId(traceId).parentId("1").id("2")
        .kind(Kind.CLIENT)
        .timestamp((TODAY + 50) * 1000L)
        .duration(300 * 1000L)
        .localEndpoint(frontend)
        .build()
    );

    processDependencies(mixedTrace);

    assertThat(store().getDependencies(endTs(mixedTrace), DAY).execute())
      .containsOnly(DependencyLink.newBuilder()
        .parent(frontend.serviceName())
        .child(backend.serviceName())
        .callCount(1).build()
      );
  }
This tests that dependency linking ignores the high-bits of the trace ID when grouping spans
for dependency links. This allows environments with 64-bit instrumentation to participate in
the same trace as 128-bit instrumentation.
zipkin-tests/src/main/java/zipkin2/storage/ITDependencies.java