Hello there!
is there an export function for the build-in tags that sonarqube assigns to every metric?
edits are needed in PrometheusWebService.
I thought of something like this:
String tags = "[";
for(int i = 0; i < component.getTags().getTagsCount(); i++){
tags += component.getTags().getTags(i);
tags += (i == component.getTags().getTagsCount() -1)? "]" : ", ";
}
this.gauges.get(measure.getMetric())
.labels(projectName, componentPath, String.valueOf(componentLevel), componentName, parentName, tags)
.set(Double.valueOf(measure.getValue()));
}
with this small update here...
private void updateEnabledGauges() {
CollectorRegistry.defaultRegistry.clear();
this.enabledMetrics.forEach(metric -> this.gauges.put( // For each enabled metric add to the gauges map:
metric.getKey(), Gauge.build() // ... add key value pair: key = metric key, value = Gauge object
.name(METRIC_PREFIX + metric.getKey()) // ... build gauge name from prefix and metric key
.help(metric.getDescription()) // ... set help text as metric description (shown in settings UI)
.labelNames("project", "component", "level", "name", "parent", "**_tags_**")
.register()));
}
but it doesn't seem to work when deploying... help ?
thanks
Hello there!
is there an export function for the build-in tags that sonarqube assigns to every metric?
edits are needed in PrometheusWebService.
I thought of something like this:
with this small update here...
but it doesn't seem to work when deploying... help ?
thanks