Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Add a trace-id tag to the k6 HTTP metric #13

Closed
ppcano opened this issue Jul 19, 2021 · 0 comments
Closed

Add a trace-id tag to the k6 HTTP metric #13

ppcano opened this issue Jul 19, 2021 · 0 comments

Comments

@ppcano
Copy link

ppcano commented Jul 19, 2021

k6 stores various information as Tags for each metric data point.

For further investigation on the observability provider, it could be useful to add a tag with the trace-id value.

This feature could be included without the need for k6 changes. Mihail commented:

the http api takes Params as it's latest argument and you can add tags to it. But you need to be careful to add the additional tags to the last argument object as described in the js api docs instead of jsut to keep adding arguments aka
http.get(url, {headers: , tags: }) is correct http.get(url, {headers: }, {tags: }) doesn't work 🙂
Looking at the code this is likely a problem as well now as the current code just adds headers and if there is already something else provided as the last argument, the trace headers will just be added as another argument which will unfortunately not work 😉

@dgzlopes dgzlopes closed this as completed Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants