Skip to content

Fix OkHttpUtil.newDispatcher javadoc to state the concurrency bounds - #8759

Draft
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:docs/fix-okhttp-dispatcher-javadoc
Draft

Fix OkHttpUtil.newDispatcher javadoc to state the concurrency bounds#8759
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:docs/fix-okhttp-dispatcher-javadoc

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

No closing keyword: #8316 also asks for RejectedExecutionException handling, which this javadoc-only change does not address, so it should stay open.

Description

  • OkHttpUtil.newDispatcher() says the returned Dispatcher matches the OkHttp default apart from using daemon threads, but that has not been true since Bound OkHttp sender dispatchers and surface rejections #8422 (9dd6c38e0), which changed the code and left the sentence behind.
  • OkHttp's Dispatcher defaults to maxRequests = 64 and an executor with an unbounded maximum pool size; this method bounds both to max(availableProcessors, 5).
  • That bound was requested during the Bound OkHttp sender dispatchers and surface rejections #8422 review to line the OkHttp sender up with JdkHttpSender.newExecutor(), so the javadoc now names it.
  • Javadoc only — no code change. maxRequestsPerHost is left out because it is still OkHttp's own default.

Testing done

  • Docs-only, test-exempt: no test added. OkHttpUtilTest.newDispatcher_isBounded(), added by Bound OkHttp sender dispatchers and surface rejections #8422, already asserts the max(availableProcessors, 5) bound the new javadoc describes.
  • ./gradlew :exporters:sender:okhttp:check — 46 tests passed.
  • docs/apidiffs/current_vs_latest/opentelemetry-exporter-sender-okhttp.txt is unchanged (japicmp does not read javadoc text).

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.29%. Comparing base (e2efec5) to head (a449dad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8759   +/-   ##
=========================================
  Coverage     91.29%   91.29%           
  Complexity    10498    10498           
=========================================
  Files          1006     1006           
  Lines         28338    28338           
  Branches       3581     3581           
=========================================
+ Hits          25870    25871    +1     
  Misses         1675     1675           
+ Partials        793      792    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-09-02 14:35 UTC

Move out of draft to request review.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant