Skip to content

Opamp migration#789

Merged
LikeTheSalad merged 14 commits into
elastic:mainfrom
LikeTheSalad:opamp-migration
Sep 22, 2025
Merged

Opamp migration#789
LikeTheSalad merged 14 commits into
elastic:mainfrom
LikeTheSalad:opamp-migration

Conversation

@LikeTheSalad

@LikeTheSalad LikeTheSalad commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Closes #788

@LikeTheSalad
LikeTheSalad marked this pull request as ready for review September 11, 2025 09:32
@LikeTheSalad
LikeTheSalad requested a review from a team as a code owner September 11, 2025 09:32
@jackshirazi

Copy link
Copy Markdown
Contributor

Upstream is missing exponential backoff which we currently have available in the agent. I think it's okay to miss out that feature for now, but we need to prioritize it upstream

Comment thread custom/src/main/java/co/elastic/otel/dynamicconfig/internal/OpampManager.java Outdated
@LikeTheSalad

Copy link
Copy Markdown
Contributor Author

Upstream is missing exponential backoff which we currently have available in the agent. I think it's okay to miss out that feature for now, but we need to prioritize it upstream

Whoops, I forgot to close that issue. Exponential backoff was added in the last PR.

@jackshirazi

Copy link
Copy Markdown
Contributor

so it should be applied here? because I tested and there was no backoff, it just iterated trying to connect every 30 seconds. Does it need enabling?

@LikeTheSalad

LikeTheSalad commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

so it should be applied here? because I tested and there was no backoff, it just iterated trying to connect every 30 seconds. Does it need enabling?

Hmm, that's odd. It's set here in the opamp manager. Though maybe there's an issue with the implementation itself. Just for the record, the upstream retry mode is only enabled when the server returns an unavailable error status or when the http response code is either 503 or 429 (assuming that the server doesn't return a "suggested delay" value). Those are the only scenarios where the exponential backoff should kick in. I'll double-check in case there's an issue around it.

@jackshirazi

Copy link
Copy Markdown
Contributor

ah, I test with an unavailable port, so connection refused

jackshirazi
jackshirazi previously approved these changes Sep 18, 2025
@LikeTheSalad

Copy link
Copy Markdown
Contributor Author

ah, I test with an unavailable port, so connection refused

Got it. Still, I took the time and added a test case for exponential backoff in OpampManagerTest just to make sure it works well even after potential upstream changes in the future, as it's still incubating.

@jackshirazi

Copy link
Copy Markdown
Contributor

I added open-telemetry/opentelemetry-java-contrib#2274 which we'll get here when it winds onto the version that has it

@LikeTheSalad
LikeTheSalad merged commit bb2d0ac into elastic:main Sep 22, 2025
16 checks passed
@SylvainJuge SylvainJuge added the enhancement New feature or request label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-java enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use upstream OpAMP client

3 participants