RUMM-2834: Tracing feature stores context in the common context storage#1216
Merged
Conversation
0xnm
marked this pull request as ready for review
January 5, 2023 12:51
Codecov Report
@@ Coverage Diff @@
## feature/sdkv2 #1216 +/- ##
=================================================
+ Coverage 82.67% 82.75% +0.08%
=================================================
Files 353 353
Lines 12576 12589 +13
Branches 2086 2087 +1
=================================================
+ Hits 10397 10418 +21
+ Misses 1541 1528 -13
- Partials 638 643 +5
|
mariusc83
approved these changes
Jan 5, 2023
| * not reuse the already existing pending data persistence file. By default it is `false`. | ||
| * @param callback an operation called with an up-to-date [DatadogContext] | ||
| * and an [EventBatchWriter]. Callback will be executed on a worker thread from I/O pool | ||
| * and an [EventBatchWriter]. Callback will be executed on a worker thread from I/O pool. |
xgouchet
approved these changes
Jan 6, 2023
0xnm
deleted the
nogorodnikov/rumm-2834/tracing-feature-stores-context-in-the-common-context-storage
branch
January 6, 2023 10:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
This change makes tracing feature to store its context (active span) in the common context storage.
The tricky part is that active span (span backed by the current active scope) is thread-local, so each thread may have its own active span. To support such thread-local storage I'm using
addScopeListenerAPI to associate the active context with the particular thread and then later to read it fromDatadogContextfor the particular thread as well (reminder:DatadogContextis created on the caller thread).Review checklist (to be filled by reviewers)