arcus-azure/arcus.scripting

Support for K6 performanceTests upload to Log Analytics

Opened this issue · 4 comments

Is your feature request related to a problem? Please describe.
I've been using K6 on a project and quite like it. Unfortunately the CI/CD setup is a bit cumbersome (that is for processing the results at least). There's a K6 task for uploading the results to Application Insights but it requires a ClientSecet.

We've been using this script documented in this blogpost which is quite handy for upload to Log Analytics (and leverages the pipeline identity).

In addition, aside from an upload a good workbook template to visualize the results in Log Analytics and build in support for deploying it to Log Analytics would have quite some added value.

Describe the solution you'd like
One or two functions supporting upload to Log Analytics using pipeline identity with a parameter allowing a workbook template to be past to. A decent template example could be provided in the docs

Describe alternatives you've considered
Extending the K6 task or creating a new one for uploading results to Azure Log Analytics.

Additional context
Add any other context or screenshots about the feature request here.

If I understand your request well, it is actually 2-fold:

  • 1 script that in itself won't really have any relation to K6 specifically, as it is more related to uploading a workbook to Log Analytics?
  • 1 script to take the output from K6 and push that data into Log Analytics.

The following however probably is more K6-specific, but can be documented indeed:

A decent template example could be provided in the docs

Also, feel free to provide a decent/working template :)

Just some input on uploading the results to App Insights:

You say that a client-secret is required, but is that such a problem ? You obviously don't want to have the client-secret in your pipeline, but you can have your client-secret stored in KeyVault and let your pipeline retrieve (and use) it.

In our case this was a discussion with a dedicated platform team that I didn't attend so I can't really go into detail here. But as far as I know a client-secret was not an option.

I must honestly say that I understand, the alternative -the script- works fine and doesn't require a client-secret. I personally think that client-secrets should be avoided whenever possible. They can be leaked and can require periodic renewal.

Also, feel free to provide a decent/working template :)

attached.
ARM_k6Workbook.zip