WingtipsSpringBoot2WebfluxConfiguration { protected @Nullable HttpTagAndSpanNamingStrategy<ServerWebExchange, ServerHttpResponse> extractTagAndNamingStrategy( WingtipsSpringBoot2WebfluxProperties props ) { String strategyName = props.getServerSideSpanTaggingStrategy(); if (StringUtils.isBlank(strategyName)) { return null; } if ("zipkin".equalsIgnoreCase(strategyName)) { return ZipkinHttpTagStrategy.getDefaultInstance(); } if("opentracing".equalsIgnoreCase(strategyName)) { return OpenTracingHttpTagStrategy.getDefaultInstance(); } if("none".equalsIgnoreCase(strategyName) || "noop".equalsIgnoreCase(strategyName)) { return NoOpHttpTagStrategy.getDefaultInstance(); } try { return (HttpTagAndSpanNamingStrategy<ServerWebExchange, ServerHttpResponse>) Class.forName(strategyName).newInstance(); } catch (Exception ex) { logger.warn("Unable to match tagging strategy \"{}\". Using the default strategy (Zipkin)", strategyName, ex); return null; } } @Autowired  WingtipsSpringBoot2WebfluxConfiguration(WingtipsSpringBoot2WebfluxProperties wingtipsProperties); @Bean @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) WingtipsSpringWebfluxWebFilter wingtipsSpringWebfluxWebFilter(); @Bean WingtipsReactorInitializer reactorInitializer();  }
@UseDataProvider("extractTagAndNamingStrategyScenarioDataProvider") @Test public void extractTagAndNamingStrategy_works_as_expected( ExtractTagAndNamingStrategyScenario scenario ) { WingtipsSpringBoot2WebfluxProperties props = generateProps( false, null, null, scenario.strategyName, null, false ); WingtipsSpringBoot2WebfluxConfiguration conf = new WingtipsSpringBoot2WebfluxConfiguration(props); HttpTagAndSpanNamingStrategy<ServerWebExchange, ServerHttpResponse> result = conf.extractTagAndNamingStrategy(props); if (scenario.expectedResultClass == null) { assertThat(result).isNull(); } else { assertThat(result).isNotNull(); assertThat(result.getClass()).isEqualTo(scenario.expectedResultClass); } if (scenario.expectedExactMatch != null) { assertThat(result).isSameAs(scenario.expectedExactMatch); } }