Skip to content

Conversation

@jmjoy
Copy link
Member

@jmjoy jmjoy commented Jul 17, 2022

For cross threads/coroutines scenes.

prost-derive = "0.10.1"
thiserror = "1.0.31"
tokio = { version = "1.18.2", features = ["full"] }
tokio = { version = "1.18.2", features = ["parking_lot"] }
Copy link
Member Author

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-commenter
Copy link

codecov-commenter commented Jul 17, 2022

Codecov Report

Merging #29 (ecba7f8) into master (c544be8) will decrease coverage by 2.62%.
The diff coverage is 17.85%.

@@            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     
Impacted Files Coverage Δ
src/context/span.rs 0.00% <ø> (ø)
src/reporter/log.rs 0.00% <ø> (ø)
tests/trace_context.rs 0.00% <ø> (ø)
src/context/trace_context.rs 21.08% <17.85%> (-2.49%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c544be8...ecba7f8. Read the comment docs.

@jmjoy jmjoy marked this pull request as ready for review July 17, 2022 07:59
@jmjoy
Copy link
Member Author

jmjoy commented Jul 17, 2022

@wu-sheng How about the api design?


// TODO Using for capture and continued.
#[allow(dead_code)]
pub(crate) fn with_active_span_mut<T>(
Copy link
Member

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?

Copy link
Member Author

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.

@wu-sheng
Copy link
Member

@wu-sheng How about the api design?

Just commented. Sorry for late, I was involved in ApacheCon Asia keynote panel recording.

@wu-sheng wu-sheng added this to the 0.3.0 milestone Jul 17, 2022
@wu-sheng wu-sheng added the enhancement New feature or request label Jul 17, 2022
@jmjoy
Copy link
Member Author

jmjoy commented Jul 17, 2022

@wu-sheng How about the api design?

Just commented. Sorry for late, I was involved in ApacheCon Asia keynote panel recording.

Cool.

@wu-sheng
Copy link
Member

And, please add an e2e testing to verify the capture/continuous features.

@jmjoy
Copy link
Member Author

jmjoy commented Jul 17, 2022

And, please add an e2e testing to verify the capture/continuous features.

OK.

jmjoy and others added 2 commits July 19, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants