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
fix NPE for Dubbo plugin #1260
Merged
Merged
fix NPE for Dubbo plugin #1260
Conversation
This file contains 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
…ationTest, reuse some test initial codes
… production environment
- Reduce allocations by not wrapping callbacks - Make plugin experimental (opt-in) - Add @NonnullApi package-level annotations - Use transaction.type=request, which is consistent with gRPC - Use activate() instead of activateInScope() to reduce allocations - Use StringBuilder.append(java.lang.CharSequence, int, int) instead of String.substring(int) to reduce allocations
Cleanup PR
- Use host:port for destination.service.resource - Instrument both FutureFilter and MonitorFilter for alibaba dubbo - Map context ResponseCallback to context because RpcContext is reset already - Make tests more resilient by waiting for transaction
- Make Apache tests more resilient - remove sleeps
was previously used to track classes loaded by the canLoadClass matcher. But nowadays, it doesn't load classes but only attempts to load the class' resource
# Conflicts: # CHANGELOG.asciidoc # apm-agent-plugins/apm-dubbo-plugin/pom.xml # apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AbstractAlibabaDubboInstrumentation.java # apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaResponseFutureInstrumentation.java # apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/AlibabaRpcContextInstrumentation.java # apm-agent-plugins/apm-dubbo-plugin/src/main/java/co/elastic/apm/agent/dubbo/helper/AsyncCallbackCreatorImpl.java # apm-agent-plugins/apm-dubbo-plugin/src/test/java/co/elastic/apm/agent/dubbo/ApacheDubboInstrumentationTest.java # docs/configuration.asciidoc # elastic-apm-agent/pom.xml
@felixbarny sorry, A NPE problem was found in some conditions, i push a commit to fix it |
felixbarny
approved these changes
Jun 30, 2020
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.
What does this PR do?
To fix NPE for dubbo plugin.
it might be a problem in dubbo, when the application is both provider and consumer,
context.isConsumerSide()
is invoking on MonitorFilter exit, NPE will be thrown.But actually, there is no need to call
context.isConsumerSide()
, so we can usespan != null
instead.