-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add "scenario" as default system tag #1518
Conversation
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.
LGTM! We really should refactor runFn... eventually... 😅
Codecov Report
@@ Coverage Diff @@
## new-schedulers #1518 +/- ##
==================================================
+ Coverage 76.64% 76.69% +0.05%
==================================================
Files 163 163
Lines 13044 13047 +3
==================================================
+ Hits 9998 10007 +9
+ Misses 2532 2527 -5
+ Partials 514 513 -1
Continue to review full report at Codecov.
|
if scenario != "" && opts.SystemTags.Has(stats.TagScenario) { | ||
tags["scenario"] = scenario | ||
} |
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.
So we don't want to let people overwrite scenario
as a tag ?
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.
hmm 😕 what's stopping them from overwriting it in the per-request tags
?
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.
we merge them above in tags
and here we set tags[scenario]
regardless :). Same btw goes for iter, vu and group. To be honest, I am not against us overwriting them, but maybe at least have some log about it.
Although this will probably need to be as part of #1478 as here it will be too noisy
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.
hmm the tags we merge with above are the VU activation tags, I think... so yes, I don't think you should be able to overwrite the k6 system tags with the per-scenario tags
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.
Yeah, I also considered it a deliberate design choice, especially since there's a workaround: they can create a custom tag with the same name and use --system-tags
to disable the built-in ones. So I'm OK with this approach too.
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.
Yeah, I am also okay with us overwriting it. I would just prefer if we log it somewhere when it happens.
With #1478 I can do it once per initialization ... which is probably way too noisy still ... :(
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.
but you can (and should) just merge this for now :D
This tags all metrics emitted in the main "exec" function with a "scenario" tag set to the scenario name or "default" if no custom scenarios were defined. It can be disabled with the
--system-tags
option.There's no issue for this specific feature, but see #796 and #1300.