Merged
Conversation
… writing to field
Migrate more plugins
- Add AssignTo annotation to assign to different targets by returning an Object[] - Add GlobalState annotation - Create ThreadLocalRegistry to easily construct global thread locals - Patch class file version to at least 51 (Java 7) in order to be able to insert invokedynamic instructions - Load the whole package of the Advice class from a dedicated plugin classloader that's a child of the classloader of the instrumented class - Depend on byte-buddy-dep and manually shade asm so that we can use asm-commons
- Rename helper class loader to plugin class loader - Add GlobalVariables registry
Some are currently failing see raphw/byte-buddy#880
2 tasks
Member
|
As said during the meeting we had today:
|
- Fix matcher for ForkJoinPool - Add support for parallel streams - Simplify testing of bootstrap instrumentations - Remove java.* from the default exclusions - Disallow agent types in advice signature - Enable previously disabled async Dubbo tests
9 tasks
allow agent classes to be instrumented
- Don't start agent on early J9 versions that crash on indy bootstrap - Fix location strategy order to avoid ClassNotFoundExceptions on Payara
eyalkoren
reviewed
Jun 25, 2020
Contributor
eyalkoren
left a comment
There was a problem hiding this comment.
Epic PR!! That's really a whole new agent technology!
First review chunk - looks great so far, didn't find anything major, a few minor comments/suggestions/questions.
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmInstrumentation.java
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/bytebuddy/postprocessor/AssignTo.java
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmInstrumentation.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmInstrumentation.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/ElasticApmAgent.java
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/bci/IndyBootstrap.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/util/PackageScanner.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/util/PackageScanner.java
Show resolved
Hide resolved
Co-authored-by: eyalkoren <41850454+eyalkoren@users.noreply.github.com>
eyalkoren
reviewed
Jun 28, 2020
Contributor
eyalkoren
left a comment
There was a problem hiding this comment.
Chunk 2, a smaller one today...
...t-core/src/main/java/co/elastic/apm/agent/bci/methodmatching/TraceMethodInstrumentation.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/main/java/co/elastic/apm/agent/threadlocal/RemoveOnGetThreadLocal.java
Outdated
Show resolved
Hide resolved
apm-agent-core/src/test/java/co/elastic/apm/agent/bci/InstrumentationTest.java
Show resolved
Hide resolved
eyalkoren
approved these changes
Jul 2, 2020
Contributor
eyalkoren
left a comment
There was a problem hiding this comment.
LGTM.
Did we get to a threshold of doing more non-inlined than inlined? If so, can and should we configure BB to not-inline by default and explicitly define only when we want to inline?
...ins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/api/impl/DubboTestApiImpl.java
Show resolved
Hide resolved
...concurrent-plugin/src/main/java/co/elastic/apm/agent/concurrent/ExecutorInstrumentation.java
Show resolved
Hide resolved
...concurrent-plugin/src/main/java/co/elastic/apm/agent/concurrent/ExecutorInstrumentation.java
Show resolved
Hide resolved
...m-java-concurrent-plugin/src/test/java/co/elastic/apm/agent/concurrent/ForkJoinPoolTest.java
Show resolved
Hide resolved
Comment on lines
+93
to
+97
| assertThat(Stream.of("foo", "bar", "baz") | ||
| .parallel() | ||
| .<AbstractSpan<?>>map(s -> tracer.getActive()) | ||
| .distinct()) | ||
| .containsExactly(transaction); |
Contributor
There was a problem hiding this comment.
Maybe even more explicit is:
Suggested change
| assertThat(Stream.of("foo", "bar", "baz") | |
| .parallel() | |
| .<AbstractSpan<?>>map(s -> tracer.getActive()) | |
| .distinct()) | |
| .containsExactly(transaction); | |
| assertThat(Stream.of("foo", "bar", "baz") | |
| .parallel() | |
| .<AbstractSpan<?>>map(s -> tracer.getActive())) | |
| .containsExactly(transaction, transaction, transaction); |
Member
Author
There was a problem hiding this comment.
True, but I don't want to execute the tests again because of that.
20 tasks
37 tasks
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.
Uses Byte Buddy's new ability to dispatch to advices via
INVOKEDYNAMIC.Excerpt from the Javadoc of
IndyBootstrap:First step of #1085
Supersedes #1090
Refactors the JDBC and Servlet plugin to be indy plugins. Prepares some more plugins for easy migration to indy plugins.