-
Notifications
You must be signed in to change notification settings - Fork 937
Add signal correlation API with thread-local buffer approach #1436
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
base: master
Are you sure you want to change the base?
Add signal correlation API with thread-local buffer approach #1436
Conversation
ProfilesData data = dumpAndGetProfile(profiler); | ||
profiler.stop(); | ||
|
||
assert data.getDictionary().getLinkTableCount() == 1 : data.getDictionary().getLinkTableList().toString(); |
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.
This is unexpected(?) Where is the link table coming from, since we restarted the profiler and the span context info is gone?
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 should still have the empty link for samples without trace context
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.
Right, thanks
u64 Profiler::recordSample(void* ucontext, u64 counter, EventType event_type, Event* event) { | ||
atomicInc(_total_samples); | ||
|
||
if (_last_epoch != _epoch) { |
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.
I'm pretty sure this should be read with some level of synchronization, but you can leave it as it is for now.
Description
Add API methods to correlate profiling samples with OpenTelemetry trace and span IDs.Not ready for review.
Related issues
N/A
Motivation and context
N/A
How has this been tested?
N/A
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.