Skip to content

🚀 SonarQube: SonarQube Application Support in Backstage Plugin #5387

@raviv-philips

Description

@raviv-philips

Workspace

sonarqube

🔖 Feature description

Summary

The SonarQube plugin in our Backstage portal currently displays code quality reports for repositories based on the project key defined in the catalog file.

However, when using SonarQube Applications (which aggregate multiple projects in a monorepo), the plugin does not work.

Sonar Application which aggregates multiple projects that share a lifecycle into a single, synthetic project: https://docs.sonarsource.com/sonarqube-server/user-guide/applications

Steps Tried

  • Defined sonarqube.org/project-key in the catalog-info.yaml -> works as expected.
  • Created a SonarQube Application for the monorepo and replaced the project key with the application key -> did not work.
  • Tried using an alternative annotation:
    sonarqube.org/application-key: <application-key>
    -> also did not work.

Question / Request

Is it currently possible to show SonarQube Applications in the Backstage Sonar plugin?

If yes, could you provide the correct configuration or point me to relevant documentation?

If not supported today, please could we add support for application-level dashboards in the plugin?

🎤 Context

This would be very useful for mono repos where a single Application groups multiple SonarQube projects.

✌️ Possible Implementation

1. Add a new annotation

Support a new annotation in catalog-info.yaml:

sonarqube.org/application-key: <application-key>

2. Backend enhancement

Enhance the sonarqube-backend plugin to check for application-key.

If application-key exists:

Call SonarQube APIs for applications:

/api/measures/component_tree -> aggregated metrics for the application

/api/application_status/list -> resolve child projects (optional for drilldown)

Transform the response into the same format as project metrics (coverage, bugs, vulnerabilities, code smells).

3. Frontend enhancement

Update the UI to recognize when an Application is being displayed.

Show:

  • Aggregated health metrics (e.g., coverage, maintainability, reliability, security rating).
  • Optional link-out to the Application dashboard in SonarQube.
  • Preserve the same look-and-feel as Project dashboards for consistency.

4. Fallback logic

If application-key is not found or unsupported, fallback to existing project-key logic.

Maintain backward compatibility.

5. Testing Strategy

Single project repo -> existing functionality unchanged.

Monorepo with multiple Sonar projects grouped in one Application -> aggregated metrics displayed.

Edge case: misconfigured annotation -> plugin should fail gracefully with a clear error message.

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions