-
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
Dynamic counters #1900
Comments
You can find the rationale for knowing the metrics in the init context in this issue, #1832, as well as some of the many connected issues to it like #1435, #1443, #1321 Even though these issues aren't implemented yet, their implementation depends on us knowing what metrics exist and their types and contents in the init context. Thankfully, that won't be a breaking change, since as you have seen, you can't create custom metrics outside of the init context, even in old k6 version. All of that said, can you explain more precisely the use case you have that required you to add counters dynamically? It would be useful to know and may influence us on how we implement these things, or there might be an alternative approach. |
Here is an example of use case:
Note that many concurrents users may pick the same random url. Olivier |
Hmm this use case seems more well suited to having a single I am not sure, the current k6 capabilities might still not be enough for what you want, but improvements should probably lie in this direction rather than what you suggest: #1321, #1441, #1313 |
I would like to understand how I could do something similar for this case. I have WS traffic which comprises a protocol message which has a msg_type in the body. I would like to be able to count these different types in a similar fashion:
Is there a current capability to be to able to do this? |
You cannot create new metrics in the middle of the test and it's unlikely we'll ever support that. Technically, you can currently work around that restriction from xk6 extensions, but we make no guarantees about not breaking that in future k6 releases. @hptabster, if you know all of the possible |
Hi
I got the below in summary report
When i mentioned this in thresholds
But I have lots of combinationation which are created on the fly. so is there a way to get this counter with tag info |
Hi.
I tried to counters "on the fly" :
But it fais with error :
Could you tell me why it's not allowed ?
And if there is workaround to do this ?
Thanks
Olivier
The text was updated successfully, but these errors were encountered: