WingtipsAsyncClientHttpRequestInterceptor implements AsyncClientHttpRequestInterceptor { protected @NotNull String getSubspanSpanName( @NotNull HttpRequest request, @NotNull HttpTagAndSpanNamingStrategy<HttpRequest, ?> namingStrategy, @NotNull HttpTagAndSpanNamingAdapter<HttpRequest, ?> adapter ) { String subspanNameFromStrategy = namingStrategy.getInitialSpanName(request, adapter); if (StringUtils.isNotBlank(subspanNameFromStrategy)) { return subspanNameFromStrategy; } return HttpRequestTracingUtils.getFallbackSpanNameForHttpRequest( "asyncresttemplate_downstream_call", getRequestMethodAsString(request.getMethod()) ); } WingtipsAsyncClientHttpRequestInterceptor();  WingtipsAsyncClientHttpRequestInterceptor(boolean surroundCallsWithSubspan);  WingtipsAsyncClientHttpRequestInterceptor(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, ClientHttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> tagAndNamingAdapter
    ); @Override @SuppressWarnings("deprecation") ListenableFuture<ClientHttpResponse> intercept(
        HttpRequest request, byte[] body, AsyncClientHttpRequestExecution execution
    ); static final WingtipsAsyncClientHttpRequestInterceptor DEFAULT_IMPL; }
@DataProvider(value = { "spanNameFromStrategy | PATCH | spanNameFromStrategy", "null | PATCH | asyncresttemplate_downstream_call-PATCH", " | PATCH | asyncresttemplate_downstream_call-PATCH", "[whitespace] | PATCH | asyncresttemplate_downstream_call-PATCH", "null | null | asyncresttemplate_downstream_call-UNKNOWN_HTTP_METHOD", }, splitBy = "\\|") @Test public void getSubspanSpanName_works_as_expected( String strategyResult, HttpMethod httpMethod, String expectedResult ) { if ("[whitespace]".equals(strategyResult)) { strategyResult = " \n\r\t "; } initialSpanNameFromStrategy.set(strategyResult); doReturn(httpMethod).when(requestMock).getMethod(); WingtipsAsyncClientHttpRequestInterceptor interceptor = new WingtipsAsyncClientHttpRequestInterceptor( true, tagAndNamingStrategy, tagAndNamingAdapterMock ); String result = interceptor.getSubspanSpanName(requestMock, tagAndNamingStrategy, tagAndNamingAdapterMock); assertThat(result).isEqualTo(expectedResult); }