@DataProvider(value = { "true", "false" }) @Test public void propagateTracingHeaders_only_sends_parent_span_id_header_if_parent_span_id_exists( boolean parentSpanIdExists ) { String parentSpanId = (parentSpanIdExists) ? UUID.randomUUID().toString() : null; Span span = Span.newBuilder("foo", Span.SpanPurpose.CLIENT) .withParentSpanId(parentSpanId) .build(); WingtipsApacheHttpClientUtil.propagateTracingHeaders(requestMock, span); if (parentSpanIdExists) { verify(requestMock).setHeader(PARENT_SPAN_ID, parentSpanId); } else { verify(requestMock, never()).setHeader(eq(PARENT_SPAN_ID), anyString()); } }
public static void propagateTracingHeaders(HttpRequest request, Span span) { HttpRequestForPropagation requestForPropagation = (request == null) ? null : new HttpRequestForPropagation(request); HttpRequestTracingUtils.propagateTracingHeaders(requestForPropagation, span); }
WingtipsApacheHttpClientUtil { public static void propagateTracingHeaders(HttpRequest request, Span span) { HttpRequestForPropagation requestForPropagation = (request == null) ? null : new HttpRequestForPropagation(request); HttpRequestTracingUtils.propagateTracingHeaders(requestForPropagation, span); } }
WingtipsApacheHttpClientUtil { public static void propagateTracingHeaders(HttpRequest request, Span span) { HttpRequestForPropagation requestForPropagation = (request == null) ? null : new HttpRequestForPropagation(request); HttpRequestTracingUtils.propagateTracingHeaders(requestForPropagation, span); } @SuppressWarnings("WeakerAccess") protected  WingtipsApacheHttpClientUtil(); }
WingtipsApacheHttpClientUtil { public static void propagateTracingHeaders(HttpRequest request, Span span) { HttpRequestForPropagation requestForPropagation = (request == null) ? null : new HttpRequestForPropagation(request); HttpRequestTracingUtils.propagateTracingHeaders(requestForPropagation, span); } @SuppressWarnings("WeakerAccess") protected  WingtipsApacheHttpClientUtil(); static void propagateTracingHeaders(HttpRequest request, Span span); static String getFallbackSubspanSpanName(HttpRequest request); }
WingtipsApacheHttpClientUtil { public static void propagateTracingHeaders(HttpRequest request, Span span) { HttpRequestForPropagation requestForPropagation = (request == null) ? null : new HttpRequestForPropagation(request); HttpRequestTracingUtils.propagateTracingHeaders(requestForPropagation, span); } @SuppressWarnings("WeakerAccess") protected  WingtipsApacheHttpClientUtil(); static void propagateTracingHeaders(HttpRequest request, Span span); static String getFallbackSubspanSpanName(HttpRequest request);  }