-
Notifications
You must be signed in to change notification settings - Fork 292
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
Support CDS #7580
Comments
Hi @jacobmarshmallow - thanks, a reproduction would be very helpful Note we are limited to what the JVM instrumentation API lets us do and how that interacts with shared classes. |
I'm having the same trouble :/ |
Hi. @mcculls the issue with not being able to use CDS with the DataDog agent is that CDS requires that the classpath must be the same as the one used to create the archive. The DataDog agent loaded with the This behaviour can be spotted by the startup warning log I tried to create a static archive of shared classes injecting also the DataDog agent, and then using the static archive to generate the shared .jsa archive:
but it did not work anyway. Looking at CDS documentation:
the point is that the classpath could be modified, but only keeping the same order of the classpath used to generate the archive and append any new class definitions at the end. This is something addressed also by other projects, see: GoogleContainerTools/jib#2471 Do you think it would be possible to figure out how to load the DataDog agent by injecting the modified classpath at the end of the class list definition, preserving CDS compatibility? |
Hi, now that Spring Boot supports it [1] [2] we were hoping to use java CDS to speed up our application start times.
In local testing we saw that it improved them drastically but when we went to run it in the cloud with the datadog agent attached we could see from the class loader + class path logs (
-Xlog:class+load:file
and-Xlog:class+path=debug:file
) that the classes were being loaded from the jars again and not the.jsa
archive we generated. I'm not actually sure if it's even technically possible, but it would be great if the agent could support loading the apps classes it needs from the archive. I am happy to provide a reproduction if necessaryThe text was updated successfully, but these errors were encountered: