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.
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 instrumentation for rocketmq #2263
Add instrumentation for rocketmq #2263
Changes from 16 commits
535b95b
0d1fbed
cb059ab
2f2cfcf
d3fd46b
bce0921
924b2e3
fb41154
451d3a5
24d1d4a
fd9f3a4
06ea7bc
f40b086
bad5c16
73bbefb
06175b2
fb3dc3d
a7f764c
66617dc
4094f4a
558acf7
310c268
c98b828
1ea63af
449b8e2
55aa9f2
a92c9b3
b5ba2ca
0887762
48de0f7
ad8cbc7
f28eee6
81c3720
1c2c71f
0ed11a0
c32bc40
460092a
0489ef9
963e012
00aa1fa
5419081
8419db8
aa2c7b5
8c606f6
4a00e83
11aa520
9ffde5d
6ad79eb
24de0ca
3aac1a5
b4eb7c3
58801ed
398246b
5b45a6a
f873db7
c0c4c9d
28f30fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There's a lot of examples in this repo that still return
Span
from tracers'startSpan
methods, but usually in the newer instrumentations we're trying to returnContext
instead. You can find some very simple examples of that in theBaseTracer
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.
Hmm, wouldn't it be worth it to check
RocketMqClientConfig.isPropagationEnabled()
here as well?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.
Is it safe to override the header this way? Won't the users lose some information?
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.
Isn't the name of the lib
rocketmq-client
? That's what we should put as the main instrumentation name then.(Also, you had a typo in the second instrumentation name)
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.
Whenever we use implements/extends type matcher we always add a
classLoaderOptimization()
method to the type instrumentation, for example:ApacheHttpAsyncClientInstrumentation
The reason for that is described in detail in the
TypeInstrumentation
Javadoc, but the here's the short version: implements/extends checks are very expensive and before trying to apply the type instrumentation it is worth checking whether the classloader contains the interface class at all.