k6
k6 copied to clipboard
Implement support to collect Usage dynamically
What?
Implement support to collect Usage dynamically
Why?
Previously Usage collection happened in one place in a pull way. The usage report needed to get access to the given data and then pull the info from it and put it in.
This reverses the pattern and adds (if available) the cloud test run id to the usage report.
Future work can pull a bunch of the other parts of it out. For example:
- used modules can now be reported from the modules
- outputs can also report their usage
- same for executors
Currently all the above are still done in the usage report code, but that is not necessary.
This also will allow additional usage reporting without the need to propagate this data through getters to the usage report, and instead just push it from the place it is used.
Allowing potentially reporting usages that we are interested to remove in a more generic and easy way.
Checklist
- [ ] I have performed a self-review of my code.
- [ ] I have added tests for my changes.
- [ ] I have run linter locally (
make lint
) and all checks pass. - [ ] I have run tests locally (
make tests
) and all tests pass. - [ ] I have commented on my code, particularly in hard-to-understand areas.