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: quarkusio#33407
(cherry picked from commit bfecf76)
  • Loading branch information
geoand authored and gsmet committed Jul 5, 2023
1 parent d6406bd commit 23ed661
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 23ed661

Please sign in to comment.