[opamp-client] Remove CompletableFuture usage#2810
Merged
jaydeluca merged 8 commits intoopen-telemetry:mainfrom May 5, 2026
Merged
[opamp-client] Remove CompletableFuture usage#2810jaydeluca merged 8 commits intoopen-telemetry:mainfrom
jaydeluca merged 8 commits intoopen-telemetry:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the now-effectively-synchronous CompletableFuture-based HTTP sending flow in opamp-client and replaces it with a synchronous HttpSender API, aligning the implementation with how callers were already using it (blocking on the future).
Changes:
- Change
HttpSender.send(...)to returnResponsedirectly (noCompletableFuture). - Update
HttpRequestServiceandOkHttpSenderto use a synchronous request/response flow (with a per-call timeout configured in OkHttp). - Update tests and bump the animalsniffer gummy-bears signature to
0.14.0.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/request/service/HttpRequestService.java | Switch request execution to synchronous HttpSender.send(...) and simplify exception handling. |
| opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/OkHttpSender.java | Implement synchronous OkHttp call execution with a 30s call timeout. |
| opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/HttpSender.java | Update sender interface to synchronous return type and add declared checked exceptions. |
| opamp-client/src/test/java/io/opentelemetry/opamp/client/internal/request/service/HttpRequestServiceTest.java | Adapt tests and test sender to the synchronous API and new exception behavior. |
| buildSrc/src/main/kotlin/otel.animalsniffer-conventions.gradle.kts | Update gummy-bears signature version to 0.14.0. |
jackshirazi
approved these changes
May 5, 2026
jaydeluca
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See this comment about the gummy bears upgrade change for context.
The tools were quick to point out that the async ritual and use of CompletableFuture wasn't really that helpful because the caller immediately turned around and called
.get(30)or whatever on the future anyway....effectively making it synchronous.(slopvomited with codex)