|
19 | 19 | import java.util.List; |
20 | 20 | import java.util.stream.Collectors; |
21 | 21 |
|
22 | | -import brave.handler.SpanHandler; |
23 | 22 | import brave.sampler.Sampler; |
24 | 23 | import brave.test.TestSpanHandler; |
25 | 24 | import io.micrometer.common.KeyValues; |
|
32 | 31 | import org.junit.jupiter.api.Test; |
33 | 32 | import org.slf4j.Logger; |
34 | 33 | import org.slf4j.LoggerFactory; |
35 | | -import zipkin2.Span; |
36 | | -import zipkin2.reporter.Reporter; |
37 | | -import zipkin2.reporter.brave.ZipkinSpanHandler; |
38 | 34 |
|
39 | 35 | import org.springframework.beans.factory.annotation.Autowired; |
40 | 36 | import org.springframework.boot.ApplicationRunner; |
|
46 | 42 | import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration; |
47 | 43 | import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration; |
48 | 44 | import org.springframework.boot.autoconfigure.ImportAutoConfiguration; |
| 45 | +import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; |
49 | 46 | import org.springframework.boot.test.context.SpringBootTest; |
50 | 47 | import org.springframework.cloud.task.configuration.EnableTask; |
51 | 48 | import org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration; |
52 | 49 | import org.springframework.context.annotation.Bean; |
53 | 50 | import org.springframework.context.annotation.Configuration; |
54 | 51 |
|
| 52 | +@AutoConfigureObservability |
55 | 53 | @SpringBootTest(classes = ObservationIntegrationTests.Config.class) |
56 | 54 | class ObservationIntegrationTests { |
57 | 55 |
|
@@ -91,11 +89,6 @@ TestSpanHandler testSpanHandler() { |
91 | 89 | return new TestSpanHandler(); |
92 | 90 | } |
93 | 91 |
|
94 | | - @Bean |
95 | | - SpanHandler zipkinSpanHandler(Reporter<Span> spanReporter) { |
96 | | - return ZipkinSpanHandler.newBuilder(spanReporter).build(); |
97 | | - } |
98 | | - |
99 | 92 | @Bean |
100 | 93 | Sampler sampler() { |
101 | 94 | return Sampler.ALWAYS_SAMPLE; |
|
0 commit comments