Skip to content

Commit

Permalink
Fix span export issue when user provided SpanProcessor beans exist
Browse files Browse the repository at this point in the history
SpanProcessor implementations are hooked into OTel in Quarkus
via the AutoConfiguredOpenTelemetrySdkBuilder#addTracerProviderCustomizer
mechanism, which in turn obtains those processor from CDI.
However, because LateBoundBatchSpanProcessor (which is the one
that ends up being responsible for the span export
via its BatchSpanProcessor delegate) was marked as a
@DefaultBean, when a user provided SpanProcessor became
part of the application, the LateBoundBatchSpanProcessor
was completely ignored.
The fix is simply to remove @DefaultBean and always have
LateBoundBatchSpanProcessor be considered as a SpanProcessor.

Fixes: #33407
  • Loading branch information
geoand committed Jul 3, 2023
1 parent 5d31f63 commit bfecf76
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Singleton;

import io.quarkus.arc.DefaultBean;

@Deprecated
@Singleton
public class OtlpExporterProvider {
@Produces
@Singleton
@DefaultBean
public LateBoundBatchSpanProcessor batchSpanProcessorForOtlp() {
return new LateBoundBatchSpanProcessor();
}
Expand Down

0 comments on commit bfecf76

Please sign in to comment.