Concurrent traces#674
Closed
brettmc wants to merge 14 commits into
Closed
Conversation
in order to allow a single php process to generate multiple traces that do not clobber each other, I've modified the existing static ContextStorage to be "default storage", ie the storage that will be used if you don't say otherwise. SpanBuilder can now accept a storage, and will use that storage to hold the context for the span. This required propagating storage to several places, so we'll see how that is received during review. Also added some tests (still without assertions) and an example which shows that it works, at least in that one scenario. There are still a bunch of broken tests to be fixed up.
Codecov Report
@@ Coverage Diff @@
## main #674 +/- ##
============================================
- Coverage 86.07% 86.06% -0.01%
- Complexity 1151 1163 +12
============================================
Files 128 128
Lines 2794 2828 +34
============================================
+ Hits 2405 2434 +29
- Misses 389 394 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
brettmc
marked this pull request as ready for review
May 12, 2022 01:09
bobstrecansky
approved these changes
May 12, 2022
brettmc
marked this pull request as draft
May 13, 2022 12:29
Contributor
Author
|
Converting back to draft while Nevay explores a more elegant solution which might replace this PR. |
Contributor
Author
|
closing, replaced by #675 |
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.
To allow concurrent traces to be generated without clobbering each other, introduce the concept of "default storage", and allow the span builder to accept a storage via
setStorage().If users wish to use non-default storage, they will be responsible for creating that storage, and keeping a reference to it (for example, in a psr-7 request attribute), and then passing that storage on when creating future spans.
Fixes: #671