Skip to content

[SonarQube] Collect metrics of WORK_DUR #20368

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

Merged
merged 3 commits into from
May 29, 2025

Conversation

IanBrison
Copy link
Contributor

@IanBrison IanBrison commented May 24, 2025

What does this PR do?

Add WORK_DUR to the list of the numeric types, to be able to collect additional metrics which are currently skipped.

Motivation

WORK_DUR stands for Working Duration and it represents the estimated effort required to fix issues or achieve certain quality objectives, which basically is an integer value.

Some metrics like the following are skipped because their types are WORK_DUR which is not treated as a numeric type.

  • new_technical_debt: Added technical debt
  • effort_to_reach_maintainability_rating_a: Effort to Reach Maintainability Rating A
  • security_remediation_effort: Security Remediation Effort
  • etc.

"metrics": [{
"id": "AYTSamBUhdvoa3XoFHiE",
"key": "new_technical_debt",
"type": "WORK_DUR",
"name": "Added Technical Debt",
"description": "Added technical debt",
"domain": "Maintainability",
"direction": -1,
"qualitative": true,
"hidden": false
}, {

Some of them are key metrics in SonarQube, and I'd like to have Datadog Agent to collect those too.

Test in my local environment

I've tested the change in my local environment and confirmed that it collects the values without any error.

before after
image image

Related PR

The numeric types were decided here and never had a new one after that.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented May 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.18%. Comparing base (1b01be5) to head (976c123).
Report is 67 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?
sonarqube 98.10% <100.00%> (ø)
tomcat ?
weblogic ?

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IanBrison IanBrison changed the title [SonarQube] Add WORK_DUR as a numeric type [SonarQube] Collect metrics of WORK_DUR May 24, 2025
@IanBrison IanBrison marked this pull request as ready for review May 24, 2025 07:21
@IanBrison IanBrison requested a review from a team as a code owner May 24, 2025 07:21
@IanBrison
Copy link
Contributor Author

IanBrison commented May 24, 2025

Hello Datadog team. Thank you for the awesome product!
Sorry for the incomplete PR. I still haven't figured out how to create the CHANGELOG that is required to pass the CI since last time.
If the change is okay, do you mind guiding me or pushing the intended change to this PR?
Thank you in advance.

@Kyle-Neale Kyle-Neale added this pull request to the merge queue May 29, 2025
Merged via the queue into DataDog:master with commit 306681b May 29, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants