-
Notifications
You must be signed in to change notification settings - Fork 305
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
HPCC-31425 Add support for tracking the active span in the thread context #18394
Conversation
https://track.hpccsystems.com/browse/HPCC-31425 |
@rpastrana this is the next logical step for managing the spans. This is a draft because it it pushed to check it runs, and also there are still some potential issues. At the moment I have combined the functionality into OwnedSpanScope, but there may be problems with that - it implies the spanscope will be destroyed on the same thread that it was set. That needs more thought. Possibly splitting the class in two, or having one derived from the other. There should also be comments about why ISpan is not linked in the saved context (and there should be a discussion). Assuming this is merged in some form, your code to report the span ids in the logging should become trivial - by linking the span object, and then accessing fields from it to log. |
span.set(_span); | ||
assertex(_span); | ||
//The span may well have been initialised with queryNullSpan(), so clean that dummy span up first. | ||
clear(); |
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 seems fine, but I wish there was a version of clear that doesn't setThreadedActiveSpan(prevSpan); since we're about the call setThreadedActiveSpan(_span)
5e350e9
to
d6d3027
Compare
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.
@ghalliday seems fine. I didn't see the comments you wanted to add regarding not linked span
…text Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Now added. |
6d541df
into
hpcc-systems:candidate-9.6.x
Type of change:
Checklist:
Smoketest:
Testing: