-
Notifications
You must be signed in to change notification settings - Fork 327
Adding instrumentation warmup #2368
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
Adding instrumentation warmup #2368
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
|
I upgraded to Byte Buddy 1.12.7 so to utilize its new API that allows us to load and invoke the instrumented bytecode created during warmup |
apm-agent-core/src/main/java/co/elastic/apm/agent/bbwarmup/WarmupInstrumentation.java
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/InstallationListenerImpl.java
Show resolved
Hide resolved
…mupInstrumentation.java Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
…nto deadlock-system-properties
What does this PR do?
Tries to invoke as much as possible instrumentation-related code paths, including the instrumentation logic and the
invokedynamicruntime linkage path, on the agent-attaching thread before registering theClassFileTransformerto the JVM-globaljava.lang.instrument.Instrumentation.This ensures that most Byte Buddy and agent types related to these processes are loaded and initialized on a single thread, thus reducing the chances for deadlock.
We will start with having warmup on by default, but with a hidden config flag that enables disabling it.
Checklist