You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/10/31 07:42:00 UTC
[GitHub] [skywalking-java] wu-sheng opened a new pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
wu-sheng opened a new pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62
<!--
⚠️ Please make sure to read this template first, pull requests that don't accord with this template
maybe closed without notice.
Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
-->
<!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
### Fix <bug description or the bug issue number or bug issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.
==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->
<!-- ==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, follow the checklist 👇 ====
### Add an agent plugin to support <framework name>
- [ ] Add a test case for the new plugin, refer to [the doc](https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Plugin-test.md)
- [ ] Add a component id in [the component-libraries.yml](https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/component-libraries.yml)
- [ ] Add a logo in [the UI repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, follow the checklist 👆 ==== -->
<!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking-java/blob/main/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
- [ ] The benchmark result.
```text
<Paste the benchmark results here>
```
- [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [x] Update the documentation to include this new feature.
- [x] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
- [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #https://github.com/apache/skywalking/issues/3661.
- [x] Update the [`CHANGES` log](https://github.com/apache/skywalking-java/blob/main/CHANGES.md).
To @apache/skywalking-committers
I am planning to bump up the version of Java agent after this gets merged. 9.0.0 would be the next major version to indicate we added Extension ClassLoader support in the core level.
First and most importantly, this credit and contribution belongs to @daimingzhi. I am just finishing this PR with a little conflict resolving, polishing, and fix a little error in the plugin test.
## Extension ClassLoader
**Extension ClassLoader**: The Extension ClassLoader is a child of Bootstrap ClassLoader and loads the extensions of core java classes from the respective JDK Extension library.
It loads files from jre/lib/ext directory or any other directory pointed by the system property java.ext.dirs.
User decides which parts of the service should be loaded by the extension classloader, so, we open `plugin.plugins_in_ext_class_loader=${SW_PLUGINS_IN_EXT_CLASS_LOADER:}` in the `agent.config` file.
Through this setting, users declare plugins are for excClassloader. Multiple values should be separated by ",".
Also support wildcard(`\*`),like `ehcache\*`.
___
This PR originally started at https://github.com/apache/skywalking-java/pull/19, @daimingzhi and I have a long discussion about this topic there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng commented on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955697525
@daimingzhi According to JDK 11 is widely used and recommended to use. JDK8 would be the only LTS JDK.
JDK8 EOF update
1. After January of 2019, only customers who have signed a support contract with Oracle will still receive security updates for Oracle JDK 8.
2. Maintenance for OpenJDK 8 is planned for at least another 4 years, until September 2023. 2 years left for EOL.
So, generally, according to the roadmap of JDK, `java.ext.dirs` should be replaced by `cp` or `classpath`. I will close this PR with original one as well. But I will add a FAQ doc to say what is going on, if user wants to try this draft feature, feel free to download and try.
___
Same as this reason, I would NOT bump up agent version to v9. Let's stay in v8 for longer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng closed pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng closed pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng commented on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955677312
I noticed precious plugin test codes didn't verify this feature. Because Spring classloader includes target jars in the Spring fatjar, which means the httpclient jars are not loaded through ext-classloader.
Let me fix this test case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng edited a comment on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng edited a comment on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955695758
An update, `-Djava.ext.dirs` is obsolete. Since JDK9 you will see this
```
<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.
.Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng commented on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955653052
To reviewers(@apache/skywalking-committers), when you merge this, please make sure we have @daimingzhi listed as a co-author of this PR. Because of `squash and merge policy`, this PR will belong to my account I am afraid. Let's keep the track correctly and respect our contributor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng edited a comment on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng edited a comment on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955695758
An update, `-Djava.ext.dirs` is obsolete. Since JDK11, you will see this
```
<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.
.Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-java] wu-sheng commented on pull request #62: [Agent v9 core] Add support for Java Extension Class Loader.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #62:
URL: https://github.com/apache/skywalking-java/pull/62#issuecomment-955695758
An update, `-Djava.ext.dirs` is obsolete
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org