-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SonarQube] Re-enable collection of metrics related to "New Code" #19485
base: master
Are you sure you want to change the base?
[SonarQube] Re-enable collection of metrics related to "New Code" #19485
Conversation
I’ve also confirmed that the test data I added caused the test to fail, and then the later changes fixed it as I intended. error message
|
Hi. Sorry for sending a review request with an incomplete PR. I'm new here. I couldn't figure out how to add the change log. I read the document of ddev changelog and followed the steps, but I couldn't see any changes. Please let me know what I might be missing or guide me on what to do next.
Thank you in advance. |
These metrics had previously caused issues with the metrics collection a few years ago. Reviewing this again to see if the metrics naming is still a blocker. |
@HadhemiDD |
What does this PR do?
Re-enables the collection of metrics that start with
new_
(e.g.,new_vulnerabilities
), which have been skipped since the following PR was merged.Additionally, it includes a change in the method of extracting the value to prevent errors.
Motivation
We want to utilize the metrics provided by SonarQube.
The official Datadog documentation states that these metrics can be used, creating a discrepancy between the feature and the documentation.
About the metrics
The metrics that start with
new_
are about the stats of "New Code".You can check the response data structure of
GET api/measures/component
in the "Response Example" of the following link.https://next.sonarqube.com/sonarqube/web_api/api/measures/component
(In the PR that I linked above had
"periods"
in the response data, but that was deprecated and is gone now)So, with metrics that start with
new_
, you have to extract the value from notmeasure['value']
but frommeasure['period']['value']
.Testing this change with my local datadog-agent, I have confirmed that the new metrics were also sent to Datadog.

Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged