Getting metrics externally or exporting them to generic format, i.e.: CSV

What is the recommended way of getting some metrics from SonarCloud externally? Is there a way to export them to a more generic and reusable format, i.e.: CSV?

  • ALM used: GitHub
  • CI system used: Jenkins
  • Languages of the repository: JS/TS + Go

The challenge we face is a periodical check (i.e.: on a weekly basis) of some key metrics such as #BUGs, Coverage, #Smells, Complexity, TechDebt, etc. How to collect such metrics “automatic” way? Is it possible to generate some exportable reports?

Thanks in advance for your help and support.

Hey there.

The SonarCloud Web API is one way to export data from SonarCloud (in JSON, which you can convert to another format). You might also find Webhooks useful as a a way to notify external systems of a new analysis and collect measures that are in your Quality Gate.

Can you go into some more detail about what’s not working out-of-the-box for this kind of reporting in SonarCloud? Historical measures are stored in the Activity tab of your project branches.

Hey Colin, and thx for your answer. The case is that we would like to collect just some of the key metrics and do it manually which is inconvenient. Exporting to CSV would provide us more flexibility and save precious resources such as time and effort. Will give it a try with WebAPI + Webhooks. Thanks & Regards!