2 ms·
Async style is not incompatible with storing the trace context in thread-local storage. You just capture the trace context when you create the callback. That's
by jeffbee 6y ago
Async style is not incompatible with storing the trace context in thread-local storage. You just capture the trace context when you create the callback. That's how Dapper works, in C++ and Java. See section 2.2 of the Dapper paper.
https://storage.googleapis.com/pub-tools-public-publication-data/pdf/36356.pdf https://storage.googleapis.com/pub-tools-public-publication-...
- aphexairlines 6y agoFrom that section: "most Google developers use a common control flow library to construct callbacks" OpenTelemetry can't guarantee that their users will use a specific library to create callbacks and can't then ensure that this library wraps callbacks with the appropriate threadlocal setup. Users would by default run into problems unless they take a number of precautionary steps.