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

Completable Future JDK11 #1908

Merged
merged 10 commits into from
May 23, 2024
Merged

Completable Future JDK11 #1908

merged 10 commits into from
May 23, 2024

Conversation

kanderson250
Copy link
Contributor

Resolves #1882

This PR introduces a new completable future module java.completable-future-jdk11, for JREs 11 and higher.

The reason for this change was the need to instrument CompletableFuture.completeAsync , which was introduced in Java 9 and was not part of our previous instrumentation. The new module adds support for this method (all other instrumentation is the same as java.completable-future-jdk8u40).

We decided as a team to have this instrumentation build with Java 11 and apply to Javas 11+. Javas 8-10 will use the existing CF module.

Other things of note:

  • We aren't able to test this module inside the agent, because this module is built with Java 11 and instruments JDK classes. Relevant tests have been added to the AIT repo, to be merged later.
  • I added a skip class in the java.completable-future-jdk8u40 module, Skip_SecurityPolicy. This is to prevent JREs 11 and higher from loading the module.
  • An update was made to WeaveUtils to allow the weaver to recognize Java 9 and 10 runtimes.

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.68%. Comparing base (f1e9c8c) to head (dde2220).
Report is 603 commits behind head on main.

Files with missing lines Patch % Lines
...main/java/com/newrelic/weave/utils/WeaveUtils.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1908      +/-   ##
============================================
- Coverage     70.68%   70.68%   -0.01%     
+ Complexity     9877     9859      -18     
============================================
  Files           828      826       -2     
  Lines         39848    39804      -44     
  Branches       6064     6062       -2     
============================================
- Hits          28167    28134      -33     
+ Misses         8954     8947       -7     
+ Partials       2727     2723       -4     

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

@kanderson250 kanderson250 changed the title Async spring6 cf Completable Future JDK11 May 22, 2024
@kanderson250 kanderson250 merged commit c138b8e into main May 23, 2024
111 of 112 checks passed
@kanderson250 kanderson250 deleted the async-spring6-cf branch May 23, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

CompletableFuture module for completeAsync
3 participants