-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add a ClassAndMethod class to Instrumentation API #4619
Conversation
@@ -384,3 +384,18 @@ dependencies { | |||
testImplementation(project(":instrumentation:yarpc-1.0:javaagent")) | |||
} | |||
``` | |||
|
|||
## Why we don't use ByteBuddy @Advice.Origin Method |
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.
👍
// Every usage of @Advice.Origin Method is replaced with a call to Class.getMethod, copy it | ||
// to local variable so that there would be only one call to Class.getMethod. | ||
method = originMethod; |
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.
oh interesting, great find
@@ -384,3 +384,18 @@ dependencies { | |||
testImplementation(project(":instrumentation:yarpc-1.0:javaagent")) | |||
} | |||
``` | |||
|
|||
## Why we don't use ByteBuddy @Advice.Origin Method |
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.
WDYT about moving it to the writing-instrumentation-module
file, just below the Associate instrumentation classes with instrumented library classes
section? It seems like it'd fit that doc more than this one (since it already describes details of writing an advice class)
Co-authored-by: Trask Stalnaker <[email protected]>
* Add a ClassAndMethod class to Instrumentation API * remove sentence * Update docs/contributing/writing-instrumentation.md Co-authored-by: Trask Stalnaker <[email protected]> * address review comment Co-authored-by: Trask Stalnaker <[email protected]>
Resolves #4592