-   Notifications  You must be signed in to change notification settings 
- Fork 25.6k
Update apm agent to 1.36.0 #94716
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
Update apm agent to 1.36.0 #94716
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Have you tried configuring ES with tracing enabled?
| Pinging @elastic/es-core-infra (Team:Core/Infra) | 
| 
 Yes, just starting ES locally, so only a single node, if you have the chance to double check with a 2+ node cluster that would probably be safer. | 
| Thanks @SylvainJuge. I've created #94730 to also put a process in place to ensure we're keeping the bundled agent up to date. | 
| @SylvainJuge I built a Docker image from your branch and tested a 3 node ES cluster with Kibana, and it all seems to work, so long as I have agent debug logging disabled. Initially, I didn't notice that I had the agent running with debug logging, and that did indeed seems to break a lot of span recording. But without debugging, all good. | 
| Thanks for checking that @pugnascotia ! | 
| @elasticmachine run elasticsearch-ci/docs | 
Fixes elastic#94689. The APM agent version 1.33.0 fails to start on JDK 20, which prevents the APM integration to work as expected. As a consequence, the tracing does not work. When setting `ELASTIC_APM_LOG_LEVEL=debug` and `ELASTIC_APM_LOG_FILE=/tmp/log.txt`, the agent log shows that there is an issue with accessing `Unsafe` (sorry I don't have the exact stack trace). There was a few changes in APM agent regarding the security manager (SM) in recent versions, and updating the agent seems to make it work as expected. However, there is one known caveat so far (elastic/apm-agent-java#3074), keeping the agent with `debug` log level with `ELASTIC_APM_LOG_LEVEL=debug` makes it trigger another security exception when trying to establish connection with apm-server because the agent prints few details if a proxy is used or not (which is forbidden by default by the SM and isn't yet wrapped in a privileged call. Backport of: elastic#94716
The APM agent version 1.33.0 fails to start on JDK 20, which prevents the APM integration to work as expected. As a consequence, the tracing does not work. When setting `ELASTIC_APM_LOG_LEVEL=debug` and `ELASTIC_APM_LOG_FILE=/tmp/log.txt`, the agent log shows that there is an issue with accessing `Unsafe` (sorry I don't have the exact stack trace). There was a few changes in APM agent regarding the security manager (SM) in recent versions, and updating the agent seems to make it work as expected. However, there is one known caveat so far (elastic/apm-agent-java#3074), keeping the agent with `debug` log level with `ELASTIC_APM_LOG_LEVEL=debug` makes it trigger another security exception when trying to establish connection with apm-server because the agent prints few details if a proxy is used or not (which is forbidden by default by the SM and isn't yet wrapped in a privileged call. Backport of: #94716 Co-authored-by: SylvainJuge <sylvain.juge@elastic.co>
fixes #94689
The APM agent version 1.33.0 fails to start on JDK 20, which prevents the APM integration to work as expected.
As a consequence, the tracing does not work.
When setting
ELASTIC_APM_LOG_LEVEL=debugandELASTIC_APM_LOG_FILE=/tmp/log.txt, the agent log shows that there is an issue with accessingUnsafe(sorry I don't have the exact stack trace).There was a few changes in APM agent regarding the security manager (SM) in recent versions, and updating the agent seems to make it work as expected.
However, there is one known caveat so far (elastic/apm-agent-java#3074), keeping the agent with
debuglog level withELASTIC_APM_LOG_LEVEL=debugmakes it trigger another security exception when trying to establish connection with apm-server because the agent prints few details if a proxy is used or not (which is forbidden by default by the SM and isn't yet wrapped in a privileged call.