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 Concurrent Ruby #1682
Add instrumentation for Concurrent Ruby #1682
Changes from 67 commits
9ce6360
298fa15
0b22218
0d5dff4
cbd49b0
c40a516
c187a55
63e3a50
293d423
561274d
d0791ff
ae47f85
2f9a058
c444728
6e8cbee
8d70c30
572bf20
47c56eb
f7a8830
3784309
728cf1e
b1e90a3
6753e08
233f0d0
f74f0fd
f9eca26
17fd78e
d9cf479
e6396f6
68ae6fe
fe03b0d
8257fd2
4c6e749
8de24bb
4268a4c
c490b39
4590d5a
c074f30
bd217e8
d4a1f44
3afaa97
7147f51
0bbc679
8aadf54
c720645
153ef94
ac5fbaf
24942ce
68db668
e776ea7
02d604e
c7091f3
6ff329b
4bcfb43
226d3f9
654470c
1ce60a6
af037da
c1f3412
90ff58e
22fb1ea
4c97f2b
b3d4531
654965b
8315414
428e568
da5c467
1822b46
2bd9620
1775b57
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.
After chatting with @tannalynn,
klass.prepend
is used instead ofprepend_instrument
because allprepend_instrument
adds is logging around the instrumented library. Since the logging occurs on line 20, we don't need to repeat it here.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.
The name of this class has to have a
::Chain
suffix to have the log messages for what was instrumented show up correctly. This method looks for the second-to-last namespace and puts that in the logs. Without the::Chain
suffix, "Instrumentation" is logged instead of "ConcurrentRuby". I'll make a separate PR to fix this in the instrumentation generator.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.
We refactored this method so that it could be used by both concurrent ruby and threads. (also fibers in future!).
We also removed the thread id from the segment name to prevent thread related MGIs from occurring. I really wanted to option to turn on thread ids because it's helped me out with figuring issues out in the past, so we added the new
thread_ids_enabled
so that we can turn it on whenever we think it would help out.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 movie that has a character deliver this line and follow it up with "Am I part of you both?" but I now I can't remember it's name. Something about a garden I think.
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.
Interesting! I was thinking Dr. Seuss when I wrote this one. If you think of the title, let me know!
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.
Ah, the word "garden" was in the quote itself and it's from a book - not a movie.
The Druid of Shannara
Now I'm wondering why I thought it was a movie. I definitely have an old (15+ years?) audio clip of the quote. Maybe there was an audio book? Weird.