Improve diagnostics for external agent attachment#1901
Open
codingkiddo wants to merge 1 commit intoraphw:masterfrom
Open
Improve diagnostics for external agent attachment#1901codingkiddo wants to merge 1 commit intoraphw:masterfrom
codingkiddo wants to merge 1 commit intoraphw:masterfrom
Conversation
Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
2da55ff to
d1ab981
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves diagnostics for external Byte Buddy agent attachment.
When
net.bytebuddy.agent.attacher.dumpis configured, the generated external attachment command line is appended to the configured dump file before the external attacher process is started.Motivation
Issue #1602 mentions that external attachment failures can be difficult to troubleshoot because users only see the final failure message. Including the generated command line in the existing dump output makes it easier to inspect the Java executable, classpath, attacher class, target VM type, process id, agent path, and native flag used for the external attachment attempt.
Changes
List<String>net.bytebuddy.agent.attacher.dumpis not configuredScope
This PR intentionally does not add support for extra JVM arguments or change attachment behavior. Those parts may require a separate design discussion.
Addresses part of #1602.
Testing
./mvnw -pl byte-buddy-agent -am test./mvnw -pl byte-buddy-agent -am -DskipTests packagenet.bytebuddy.agent.attacher.dump=/tmp/byte-buddy-attacher.dumpnet.bytebuddy.agent.attacher.dumpis not configuredExample verified dump content: