While reading some blogs, I realized that heavy-load performance testing for longer durations can cause memory issues due to in-memory metrics and summary reports. To address this, I’m considering using OTEL (OpenTelemetry) to publish metrics during the test and, once the test is complete, calculate the required metrics based on the collected data.
I have a couple of questions regarding this approach:
- Is this approach safe and reliable?
- If so, what is the best way to notify an external endpoint when the test is completed?
- The external endpoint would then calculate and generate the report with the required data points.
- Consistency with K6 Reporting:
- To maintain consistency with K6’s reporting, is there a separate package or library I can use to calculate these metrics?
- Alternatively, can I rely on vendor tooling to perform the calculations and generate summary data that closely matches K6’s built-in reporting?
Looking forward to your insights and recommendations!
1 Like
Hi @kishorekumarthudi, Welcome to the community forum!
It definitely is possible to use oTel and many people seem to do so. But there is no supported way to get the end of test summary out of it afterwards that is supported. Which is what you seem to be asking here.
This is due to many reasons, but mainly as the internal representation and how metrics are send to otel is not the same and there is no project that remedy this.
Also, most users usually want to have more detailed view, especially once they start to have big enough tests to want to use external storage for metrics.
I would recommend trying out the docker compose example in the main repo. It also includes an example grafana setup with example dashboards based on metrics that k6 will emit.
I see that you also have k6-operator tagged which might need additional setup, and the above setup will likely need to be made to work with it somewhat and the storage part scaled accordingly.
All of this does work with the Grafana cloud k6 offering, including custom dashboards and integration with the rest of the grafana cloud offerings.
Hope this helps you!