From a449dad6fb1a3215d59d795f2d5760063f30b1d3 Mon Sep 17 00:00:00 2001 From: Eunbin Son Date: Fri, 28 Aug 2026 18:11:14 +0900 Subject: [PATCH] Fix OkHttpUtil.newDispatcher javadoc to state the concurrency bounds --- .../exporter/sender/okhttp/internal/OkHttpUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpUtil.java b/exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpUtil.java index 93909bd3255..4f763d25478 100644 --- a/exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpUtil.java +++ b/exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpUtil.java @@ -30,7 +30,11 @@ public static void setPropagateContextForTestingInDispatcher( OkHttpUtil.propagateContextForTestingInDispatcher = propagateContextForTestingInDispatcher; } - /** Returns a {@link Dispatcher} using daemon threads, otherwise matching the OkHttp default. */ + /** + * Returns a {@link Dispatcher} using daemon threads, with both the maximum number of concurrent + * requests and the maximum size of the backing thread pool bounded to {@code + * max(availableProcessors, 5)}, matching the bound used by {@code JdkHttpSender}. + */ public static Dispatcher newDispatcher() { int maxRequests = Math.max(Runtime.getRuntime().availableProcessors(), 5); Dispatcher dispatcher =