This commit is contained in:
Marcin Grzejszczak
2020-06-17 16:10:45 +02:00
parent 5c9f8a7618
commit f6ad2d8969

View File

@@ -98,10 +98,7 @@ public class ZipkinBackwardsCompatibilityAutoConfiguration {
DefaultListableBeanFactory beanFactory) {
List<String> beanNames = new ArrayList<>(
Arrays.asList(beanFactory.getBeanNamesForType(Sender.class)));
if (beanNames.size() != 1
|| !beanNames.contains(ZipkinAutoConfiguration.SENDER_BEAN_NAME)) {
beanNames.remove(ZipkinAutoConfiguration.SENDER_BEAN_NAME);
}
beanNames.remove(ZipkinAutoConfiguration.SENDER_BEAN_NAME);
Sender sender = (Sender) beanFactory.getBean(beanNames.get(0));
// historical constraint. Note: AsyncReporter supports memory bounds
return AsyncReporter.builder(sender).queuedMaxSpans(1000)