-
Notifications
You must be signed in to change notification settings - Fork 20
Add context capture and continued methods. #29
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
Conversation
| prost-derive = "0.10.1" | ||
| thiserror = "1.0.31" | ||
| tokio = { version = "1.18.2", features = ["full"] } | ||
| tokio = { version = "1.18.2", features = ["parking_lot"] } |
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.
As a library should use fewer features.
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
- Coverage 41.63% 39.01% -2.63%
==========================================
Files 12 12
Lines 281 305 +24
==========================================
+ Hits 117 119 +2
- Misses 164 186 +22
Continue to review full report at Codecov.
|
|
@wu-sheng How about the api design? |
|
|
||
| // TODO Using for capture and continued. | ||
| #[allow(dead_code)] | ||
| pub(crate) fn with_active_span_mut<T>( |
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.
Could you share what does this method mean?
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 method accepts a closure that modifies the top element of the active span stack. Because Arc is used, reference counting has no mutable method, so Mutex is required for internal mutability, and with_* methods can easily handle try_lock and drop, , shielding these details.
Just commented. Sorry for late, I was involved in ApacheCon Asia keynote panel recording. |
Cool. |
|
And, please add an e2e testing to verify the capture/continuous features. |
OK. |
Co-authored-by: 吴晟 Wu Sheng <[email protected]>
For cross threads/coroutines scenes.