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