@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", SpanPurpose.CLIENT) .withParentSpanId(parentSpanId) .build(); WingtipsSpringUtil.propagateTracingHeaders(httpMessageMock, span); if (parentSpanIdExists) { verify(headersMock).set(PARENT_SPAN_ID, parentSpanId); } else { verify(headersMock, never()).set(eq(PARENT_SPAN_ID), anyString()); } }
public static void propagateTracingHeaders(HttpMessage httpMessage, Span span) { HttpHeadersForPropagation headersForPropagation = (httpMessage == null) ? null : new HttpHeadersForPropagation(httpMessage); HttpRequestTracingUtils.propagateTracingHeaders(headersForPropagation, span); }
WingtipsSpringUtil { public static void propagateTracingHeaders(HttpMessage httpMessage, Span span) { HttpHeadersForPropagation headersForPropagation = (httpMessage == null) ? null : new HttpHeadersForPropagation(httpMessage); HttpRequestTracingUtils.propagateTracingHeaders(headersForPropagation, span); } }
WingtipsSpringUtil { public static void propagateTracingHeaders(HttpMessage httpMessage, Span span) { HttpHeadersForPropagation headersForPropagation = (httpMessage == null) ? null : new HttpHeadersForPropagation(httpMessage); HttpRequestTracingUtils.propagateTracingHeaders(headersForPropagation, span); } protected  WingtipsSpringUtil(); }
WingtipsSpringUtil { public static void propagateTracingHeaders(HttpMessage httpMessage, Span span) { HttpHeadersForPropagation headersForPropagation = (httpMessage == null) ? null : new HttpHeadersForPropagation(httpMessage); HttpRequestTracingUtils.propagateTracingHeaders(headersForPropagation, span); } protected  WingtipsSpringUtil(); static RestTemplate createTracingEnabledRestTemplate(); static RestTemplate createTracingEnabledRestTemplate(boolean surroundCallsWithSubspan); static RestTemplate createTracingEnabledRestTemplate(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, ClientHttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> tagAndNamingAdapter
    ); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(boolean surroundCallsWithSubspan); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, ClientHttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> tagAndNamingAdapter
    ); static void propagateTracingHeaders(HttpMessage httpMessage, Span span); static String getRequestMethodAsString(HttpMethod method); static SuccessCallback<T> successCallbackWithTracing(SuccessCallback<T> successCallback); static SuccessCallback<T> successCallbackWithTracing(
        SuccessCallback<T> successCallback,
        Pair<Deque<Span>, Map<String, String>> threadInfoToLink
    ); static SuccessCallback<T> successCallbackWithTracing(
        SuccessCallback<T> successCallback,
        Deque<Span> spanStackToLink,
        Map<String, String> mdcContextMapToLink
    ); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback,
                                                             Pair<Deque<Span>, Map<String, String>> threadInfoToLink); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback,
                                                             Deque<Span> spanStackToLink,
                                                             Map<String, String> mdcContextMapToLink); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback
    ); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback,
        Pair<Deque<Span>, Map<String, String>> threadInfoToLink
    ); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback,
        Deque<Span> spanStackToLink,
        Map<String, String> mdcContextMapToLink
    ); }
WingtipsSpringUtil { public static void propagateTracingHeaders(HttpMessage httpMessage, Span span) { HttpHeadersForPropagation headersForPropagation = (httpMessage == null) ? null : new HttpHeadersForPropagation(httpMessage); HttpRequestTracingUtils.propagateTracingHeaders(headersForPropagation, span); } protected  WingtipsSpringUtil(); static RestTemplate createTracingEnabledRestTemplate(); static RestTemplate createTracingEnabledRestTemplate(boolean surroundCallsWithSubspan); static RestTemplate createTracingEnabledRestTemplate(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, ClientHttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> tagAndNamingAdapter
    ); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(boolean surroundCallsWithSubspan); static AsyncRestTemplate createTracingEnabledAsyncRestTemplate(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, ClientHttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> tagAndNamingAdapter
    ); static void propagateTracingHeaders(HttpMessage httpMessage, Span span); static String getRequestMethodAsString(HttpMethod method); static SuccessCallback<T> successCallbackWithTracing(SuccessCallback<T> successCallback); static SuccessCallback<T> successCallbackWithTracing(
        SuccessCallback<T> successCallback,
        Pair<Deque<Span>, Map<String, String>> threadInfoToLink
    ); static SuccessCallback<T> successCallbackWithTracing(
        SuccessCallback<T> successCallback,
        Deque<Span> spanStackToLink,
        Map<String, String> mdcContextMapToLink
    ); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback,
                                                             Pair<Deque<Span>, Map<String, String>> threadInfoToLink); static FailureCallback failureCallbackWithTracing(FailureCallback failureCallback,
                                                             Deque<Span> spanStackToLink,
                                                             Map<String, String> mdcContextMapToLink); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback
    ); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback,
        Pair<Deque<Span>, Map<String, String>> threadInfoToLink
    ); static ListenableFutureCallback<T> listenableFutureCallbackWithTracing(
        ListenableFutureCallback<T> listenableFutureCallback,
        Deque<Span> spanStackToLink,
        Map<String, String> mdcContextMapToLink
    );  }