-
Notifications
You must be signed in to change notification settings - Fork 71
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
tracing
integration
#213
Comments
@ilslv for the reasoning it's slightly unclear what challenges/problems it allows us to solve? What we will be capable with it rather than without it? |
@tyranron this will allow to log something in colored mode and with concurrent execution. Logs captured during some |
@ilslv seems reasonable. I think we should give it a try at least. |
- add `tracing` Cargo feature - add `Log` variant to `event::Scenario` - describe "`tracing` integration" Book chapter Co-authored-by: Kai Ren <[email protected]>
I believe we can support better logging by integrating support for brilliant
tracing
crate, as current solution described in #177 is quite unintuitive and requires additional setup.We can implement custom
tracing::Subscriber
and passFeature
,Scenario
andStep
context insidetracing::Span
. So we can retrieve this information and pass logging event as a new kind ofcucumber::Event
s for logging them, when appropriate time comes.Unresolved questions, that require additional investigations:
spawn
ing a future, that will log after aStep
has been finished may lead to strange output behaviourMoreover,
spawn
edFuture
s by default don't inheritSpan
from context they werespawn
ed from. See tokio-rs/tracing#394 for more info.tracing
ecosystem.The text was updated successfully, but these errors were encountered: