I want to categorize specific metrics I have in SonarQube to fit my needs.
In detail: I built a Gatling Plugin for SonarQube that reads the stats which Gatling writes and puts them into SonarQube Metrics.
Now I want to categorize my measures according to the requests I did with Gatling. So, for example I have the global stats by Gatling (10,000 requests, 50ms per request, etc.) and I also have the data for the requests (for request 1 there were 1,000 requests, 40ms per request, etc.).
How is it possible to assign the request to a measure in Sonar?
A possible solution I could think about was to link the measures to specific contexts in Sonar. So, I will save the measures for the requests in a special context while the global stats are saved within the global context.
But: how can I access my measures in the Ruby-Template afterwards and what would be a good context to pick?
Update: I tried to save the same measure multiple times with the request name as the Measure.data-parameter but that resulted in an error.
I also tried changing the resources-Context Sonar saves the measure in. But I did not succeed to query the measures afterwards in the widget, they seemed to have disappeared.