load-testingtracek6

Sending traces when running load tests with Grafana k6


I want to see traces of all http requests which are send during a loadtest with k6. I used k6/experimental/tracing and tried the example from the documentation. However, it only adds the tracing specific headers. I want to configure the url of the tracing collector as well, to allow the system sending the traces to a collector. Is is already possible?

Clarification: The system under test writes its own traces. However, under load some requests take longer and I was wondering if the time to reach the system under test is also increased for those requests.


Solution

  • Thanks for your question. Full disclosure: I'm part of the k6 engineering team.

    Regarding your original question, k6 does not currently support exporting traces started using the k6/experimental/tracing module. There's an open issue to address this in the future.

    However, Grafana Cloud k6 has recently added an integration with Grafana Cloud Traces that aggregates and correlates all tracing telemetry data generated during a k6 test. You could use this integration to help solve your original problem and figure out which requests fail or have increased latency and why. To learn more, refer to the integration's documentation.