-
Notifications
You must be signed in to change notification settings - Fork 193
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
Concurrent traces #674
Concurrent traces #674
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.
|
Converting back to draft while Nevay explores a more elegant solution which might replace this PR. |
closing, replaced by #675 |
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