|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2024 the original author or authors. |
| 2 | + * Copyright 2012-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
51 | 51 | import io.opentelemetry.sdk.trace.SpanLimits;
|
52 | 52 | import io.opentelemetry.sdk.trace.SpanProcessor;
|
53 | 53 | import io.opentelemetry.sdk.trace.data.SpanData;
|
| 54 | +import io.opentelemetry.sdk.trace.export.BatchSpanProcessor; |
54 | 55 | import io.opentelemetry.sdk.trace.export.SpanExporter;
|
55 | 56 | import io.opentelemetry.sdk.trace.samplers.Sampler;
|
56 | 57 | import org.assertj.core.api.InstanceOfAssertFactories;
|
@@ -172,6 +173,8 @@ void shouldBackOffOnCustomBeans() {
|
172 | 173 | assertThat(context).hasSingleBean(SpanProcessors.class);
|
173 | 174 | assertThat(context).hasBean("customSpanExporters");
|
174 | 175 | assertThat(context).hasSingleBean(SpanExporters.class);
|
| 176 | + assertThat(context).hasBean("customBatchSpanProcessor"); |
| 177 | + assertThat(context).hasSingleBean(BatchSpanProcessor.class); |
175 | 178 | });
|
176 | 179 | }
|
177 | 180 |
|
@@ -401,6 +404,11 @@ SpanExporter spanExporter2() {
|
401 | 404 | @Configuration(proxyBeanMethods = false)
|
402 | 405 | private static final class CustomConfiguration {
|
403 | 406 |
|
| 407 | + @Bean |
| 408 | + BatchSpanProcessor customBatchSpanProcessor() { |
| 409 | + return mock(BatchSpanProcessor.class); |
| 410 | + } |
| 411 | + |
404 | 412 | @Bean
|
405 | 413 | SpanProcessors customSpanProcessors() {
|
406 | 414 | return SpanProcessors.of(mock(SpanProcessor.class));
|
|
0 commit comments