-
Notifications
You must be signed in to change notification settings - Fork 224
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
Documentation about name and url out of sync with implementation #1481
Comments
By adding a `name` tag to each request, we get that in the result as a `name` label with the corresponding value. Since the [k6 documentation](https://k6.io/docs/using-k6/http-requests/#url-grouping) says that setting `name` should not affect `url` but [in reality it does](https://github.com/grafana/k6/issues/3435), implement a nasty workaround to preserve the URL. If there's a tag with the special name `__raw_url__`, use that as the actual URL that was requested. Modify the generated script so that we add both the `name` tag (set to a sequential number based on the position of the request in the entries list) and a `__raw_url__` tag (workaround). Then in the output extension, include `name` in the metric labels and convert `__raw_url__` to `url`. Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
By adding a `name` tag to each request, we get that in the result as a `name` label with the corresponding value. Since the [k6 documentation](https://k6.io/docs/using-k6/http-requests/#url-grouping) says that setting `name` should not affect `url` but [in reality it does](https://github.com/grafana/k6/issues/3435), implement a nasty workaround to preserve the URL. If there's a tag with the special name `__raw_url__`, use that as the actual URL that was requested. Modify the generated script so that we add both the `name` tag (set to a sequential number based on the position of the request in the entries list) and a `__raw_url__` tag (workaround). Then in the output extension, include `name` in the metric labels and convert `__raw_url__` to `url`. Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
Actually, it seems like it's not a bug but the current expected behavior and you just faced the issue that the documentation isn't up to date 😢 This is expected behavior since you've specified the Off the top of my head, I can't remember what could be the best discussion that explains the rationale, maybe @codebien could help with finding it or bringing the rationale. But as the actional item, I see that we should create the task to the |
As grafana/k6#2584 (comment) mentions
the raw url has been moved to Metadata. This is now a docs issue as we want to update it to keep it consistent and aligned. |
Brief summary
The documentation here says that this input:
should produce this output:
In reality it produces this:
while I do not understand why that is the case (and I would argue that the documented behavior is much more useful; it's what I was actually trying to use), I can see that this was announced in v0.40.0 and it was implemented in v0.41.0.
It's mentioned here, too.
k6 version
0.47.0
OS
Linux
Docker version and image (if applicable)
No response
Steps to reproduce the problem
Use this script:
and run it like:
then look at the output:
Expected behaviour
As documented, the output should be:
Actual behaviour
The text was updated successfully, but these errors were encountered: