-
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 spans for scenarios and steps #263
Comments
@stepantubanov please, see #213, #258, #261 and this Book chapter. |
@tyranron From the book example, tracing output is like this:
There isn't any information as to which step/scenario this trace came from. Imagine we have 1000s of lines like this from a CI test run with some amount of concurrency, if we had scenario name / step value attributes right on the spans, then it would show up attached to each trace and make it a lot easier to track that execution through the log. But without these arguments it doesn't really add much value (just adds same words "scenario:step" to each line). And one more suggestion: It seems like enabling tracing in cucumber enables both instrumentation & sets a global tracing subscriber. Settings a subscriber is typically done by the app. It would be great if it was optional in cucumber (we could enable tracing instrumentation, but do not set global tracing subscriber).
|
There is no way traces of scenario A will be output in the middle of scenario B. They're always output before the scenario/step to which In other Also, nothing prevents you from instrumenting the concrete step matching functions with additional fields, if you will so.
AFAIRc, enabling @ilslv please, correct me if I'm wrong.
It's hard to imagine the use-case for that. Could you specify some meaningful ones? A typical |
Our
Typically yes, but we are in a special position. First, we have to embed some special I believe that above should cover all |
Thanks for the explanation. That's really nice that scenarios are printed in a linear way without being intermixed.
and
We're using it for end-to-end testing, with the webserver & background workers running in the background. And it sets it's own tracing subscriber, with various configuration parameters. I don't know if we can easily extract it into a |
This is what I was trying to do originally when I created the issue. I actually have a question about that - how can I get the current |
I can't imagine a use-case when this is not possible or even challenging.
This for example could be done either as a separate
There is currently no way to get |
This is a feature request. It would be great if
cucumber
had an optionaltracing
feature (withtracing
dependency) and add a span for every scenario / step run.Mainly I think it'd be helpful to add spans for Scenario (with
name
field) and Step (withvalue
field).With tracing enabled, it could look something like this in logs (example):
The text was updated successfully, but these errors were encountered: