|
|
|
@ -20,6 +20,10 @@ import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import io.micrometer.tracing.SpanCustomizer;
|
|
|
|
|
import io.micrometer.tracing.exporter.SpanExportingPredicate;
|
|
|
|
|
import io.micrometer.tracing.exporter.SpanFilter;
|
|
|
|
|
import io.micrometer.tracing.exporter.SpanReporter;
|
|
|
|
|
import io.micrometer.tracing.otel.bridge.CompositeSpanExporter;
|
|
|
|
|
import io.micrometer.tracing.otel.bridge.EventListener;
|
|
|
|
|
import io.micrometer.tracing.otel.bridge.EventPublishingContextWrapper;
|
|
|
|
|
import io.micrometer.tracing.otel.bridge.OtelBaggageManager;
|
|
|
|
@ -117,12 +121,12 @@ public class OpenTelemetryAutoConfiguration {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
SpanProcessor otelSpanProcessor(ObjectProvider<SpanExporter> spanExporters) {
|
|
|
|
|
return SpanProcessor.composite(spanExporters.orderedStream().map(this::buildBatchSpanProcessor).toList());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SpanProcessor buildBatchSpanProcessor(SpanExporter exporter) {
|
|
|
|
|
return BatchSpanProcessor.builder(exporter).build();
|
|
|
|
|
SpanProcessor otelSpanProcessor(ObjectProvider<SpanExporter> spanExporters,
|
|
|
|
|
ObjectProvider<SpanExportingPredicate> spanExportingPredicates, ObjectProvider<SpanReporter> spanReporters,
|
|
|
|
|
ObjectProvider<SpanFilter> spanFilters) {
|
|
|
|
|
return BatchSpanProcessor.builder(new CompositeSpanExporter(spanExporters.orderedStream().toList(),
|
|
|
|
|
spanExportingPredicates.orderedStream().toList(), spanReporters.orderedStream().toList(),
|
|
|
|
|
spanFilters.orderedStream().toList())).build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|