-
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)
#258
Conversation
Current integration looks like this: Basically we now run each scenario in The only question remains: what to do with traces that aren't attached to special
Strangely enough, but I would go with option number 3, as it gives the most flexibility. And each |
To illustrate my proposal more, if we change function from #[given(regex = r"(\d+) secs?")]
#[when(regex = r"(\d+) secs?")]
#[then(expr = "{u64} sec(s)")]
async fn step(world: &mut World, secs: CustomU64) {
tracing::info!("before waiting {secs}s");
time::sleep(Duration::from_secs(*secs) / 2).await;
tracing::info!("in between waiting {secs}s");
time::sleep(Duration::from_secs(*secs) / 2).await;
tracing::info!("after waiting {secs}s");
world.0 += 1;
assert!(world.0 < 4, "Too much!");
} to #[given(regex = r"(\d+) secs?")]
#[when(regex = r"(\d+) secs?")]
#[then(expr = "{u64} sec(s)")]
async fn step(world: &mut World, secs: CustomU64) {
tracing::info!("before waiting {secs}s");
time::sleep(Duration::from_secs(*secs) / 2).await;
// Not attached to current `Span`.
tokio::spawn(async move {
tracing::info!("in between waiting {secs}s");
});
time::sleep(Duration::from_secs(*secs) / 2).await;
tracing::info!("after waiting {secs}s");
world.0 += 1;
assert!(world.0 < 4, "Too much!");
} We'll get following output: For |
@ilslv yes, I agree that the option 3 seems to be the most reasonable in this case. |
@ilslv also, is it possible to reasonable feature-gate this |
FCM
|
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.
@ilslv mostly OK, but some minor stuff still to be polished.
I also dislike the monstrocity happening in |
Synopsis
#213
Solution
Implement
tracing
integration undertracing
feature.Writer
s integrations will be done in separate PRs.Checklist
Draft:
prefixDraft:
prefix is removed