Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create initial Java Agent to intercept Socket::connect calls #17724

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

reta
Copy link
Collaborator

@reta reta commented Mar 28, 2025

Description

Create initial Java Agent to intercept Socket::connect calls

Related Issues

Closes #17660

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 skip-changelog labels Mar 28, 2025
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request security Anything security related labels Mar 28, 2025
@reta
Copy link
Collaborator Author

reta commented Mar 28, 2025

@kumargu moving on with the Agent, the Policy is not a blocker till we jump to JDK-24 or above

@kumargu
Copy link
Contributor

kumargu commented Mar 28, 2025

@kumargu moving on with the Agent, the Policy is not a blocker till we jump to JDK-24 or above

Well, well, how did i miss that. But that's great catch and good news.


Anyways, I did a whole lot of trimming and code rewrite for the Policy. We can leverage it when we target JDK-24.

#17712

@kumargu
Copy link
Contributor

kumargu commented Mar 28, 2025

This change is lot simpler now and LGTM. thanks!

@reta
Copy link
Collaborator Author

reta commented Mar 28, 2025

Anyways, I did a whole lot of trimming and code rewrite for the Policy. We can leverage it when we target JDK-24.

Thank you, we do need that in any case, but we could proceed in parallel here

Copy link
Contributor

❌ Gradle check result for 5c79974: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 078f7d6: SUCCESS

Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 0% with 71 lines in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (399188f) to head (078f7d6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../src/main/java/org/opensearch/javaagent/Agent.java 0.00% 24 Missing ⚠️
...opensearch/javaagent/SocketChannelInterceptor.java 0.00% 22 Missing ⚠️
...rg/opensearch/javaagent/bootstrap/AgentPolicy.java 0.00% 19 Missing ⚠️
...pensearch/javaagent/StackCallerChainExtractor.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17724      +/-   ##
============================================
- Coverage     72.46%   72.42%   -0.04%     
- Complexity    65855    65891      +36     
============================================
  Files          5322     5326       +4     
  Lines        305477   305548      +71     
  Branches      44312    44322      +10     
============================================
- Hits         221359   221301      -58     
- Misses        66023    66105      +82     
- Partials      18095    18142      +47     

☔ View full report in Codecov by Sentry.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request security Anything security related v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Create initial Java Agent to intercept Socket::connect calls
3 participants