diff --git a/server/src/main/java/com/octopus/teamcity/opentelemetry/server/endpoints/honeycomb/HoneycombOTELEndpointHandler.java b/server/src/main/java/com/octopus/teamcity/opentelemetry/server/endpoints/honeycomb/HoneycombOTELEndpointHandler.java index 9dc77b1..046e880 100644 --- a/server/src/main/java/com/octopus/teamcity/opentelemetry/server/endpoints/honeycomb/HoneycombOTELEndpointHandler.java +++ b/server/src/main/java/com/octopus/teamcity/opentelemetry/server/endpoints/honeycomb/HoneycombOTELEndpointHandler.java @@ -94,7 +94,12 @@ private SpanProcessor buildGrpcSpanProcessor(Map 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