Release v2.0.0
Release Notes - Version 2.0.0
Major Features
- Severity Label Support: Added
severitylabel to all exported metrics, enabling filtering by BLOCKER, CRITICAL, MAJOR, MINOR, and INFO levels in Prometheus/Grafana. - Dynamic Severity Detection: Automatically detects and exports severity-specific metrics (e.g.,
blocker_violations,critical_vulnerabilities). - Enhanced SonarQube Compatibility: Verified support for SonarQube versions 9.x through 25.10.
New Features
- Added Docker Compose setup for easy local testing:
docker-compose.yml— spins up SonarQube + Prometheusprometheus/prometheus.yml— pre-configured scraping
- Added comprehensive test suite for severity label functionality
- Improved documentation with PromQL examples for severity filtering
Breaking Changes
- Metrics now include a third label
severity. Update your Grafana dashboards if they assume exactly two labels. - Default severity "ALL" for total metrics without severity specification.
Querying Examples
Filter metrics by severity in Prometheus/Grafana:
# Blocker bugs by repository
sum by (key, name) (sonarqube_bugs{severity="BLOCKER"})
# Critical vulnerabilities
sum by (key, name) (sonarqube_vulnerabilities{severity="CRITICAL"})
# All severities for a metric
sum by (severity) (sonarqube_code_smells)
Installation
- Download the plugin JAR from releases
- Place in
$SONARQUBE_HOME/extensions/plugins/ - Restart SonarQube
Compatibility
- SonarQube: 9.x, 10.8, and 25.10
- Java: 17+
- Prometheus: 0.16+ (client)
Docker Quick Start
# Build plugin
mvn -DskipTests package
# Copy to plugins directory
mkdir -p plugins
cp target/*.jar plugins/
# Start stack (SonarQube + Prometheus)
docker-compose up -dDocumentation
- Added examples in
README.md - New Prometheus configuration examples in
./resources/prometheus/ - Updated Grafana dashboard template in
resources/grafana_dashboard.json
Contributors
Thanks to: