Skip to content

Commit

Permalink
Increase throughput of the BatchSpanProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-richardson committed Nov 28, 2024
1 parent 5490846 commit f120a98
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ private SpanProcessor buildGrpcSpanProcessor(Map<String, String> headers, String
.setMeterProvider(meterProvider)
.build();

return BatchSpanProcessor.builder(spanExporter).build();
return BatchSpanProcessor.builder(spanExporter)
.setMaxQueueSize(32768) // Default is 2048. Increasing it to limit dropped spans.
.setScheduleDelay(Duration.ofSeconds(5)) // Default is 5s. This is another lever we can tweak.
.setMaxExportBatchSize(8192) // Default is 512. Increasing it to limit dropped spans.
.setMeterProvider(meterProvider)
.build();
}

@Override
Expand Down

0 comments on commit f120a98

Please sign in to comment.