Skip to content

CLI-3 Add telemetry for CLI#49

Open
damien-urruty-sonarsource wants to merge 2 commits intomasterfrom
task/dam/CLI-3-add-telemetry
Open

CLI-3 Add telemetry for CLI#49
damien-urruty-sonarsource wants to merge 2 commits intomasterfrom
task/dam/CLI-3-add-telemetry

Conversation

@damien-urruty-sonarsource
Copy link
Contributor

No description provided.

@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/CLI-3-add-telemetry branch 4 times, most recently from 823fd86 to f2416f6 Compare February 26, 2026 16:50
@sonarqube-agent
Copy link

sonarqube-agent bot commented Feb 26, 2026

Remediation Agent Summary 📊

🤖 To review: The 1 issues found require manual fixes.
Issues requiring manual fix (1)

QualityIssueStatus
Maintainability
🟠 Medium
Extract this nested ternary operation into an independent statement.

Why is this an issue?


Unresolved

Note

Help us improve the Agent!
Have a suggestion or found an issue? Share your feedback here.

@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/CLI-3-add-telemetry branch 6 times, most recently from 0a4997c to c28be4c Compare February 27, 2026 14:42
@sonarqubecloud
Copy link

SonarQube reviewer guide

Review in SonarQube

Summary: Add telemetry collection and CLI configuration commands. Enables anonymous usage tracking (opt-in by default) and introduces sonar config telemetry to manage settings. Refactors error handling to use custom exception types instead of direct process.exit() calls.

Review Focus:

  • Error handling refactor from process.exit() to exception-based flow in run-command.ts and throughout commands — verify this doesn't break exit code propagation
  • Telemetry event collection (storeEvent) and detached worker flushing (flushTelemetry) — check for race conditions and ensure worker spawning works correctly
  • New InvalidOptionError and CommandFailedError classes — ensure consistent error classification across commands
  • Auth flow enrichment with server-side IDs (userUuid, organizationUuidV4, sqsInstallationId) — confirm API calls are non-blocking and safe

Start review at: src/index.ts. This is the CLI entry point and shows how the new error handling, telemetry hooks, and config command integrate into the main flow. It's critical to verify the exitOverride handler and postAction hook work correctly with the refactored error handling throughout the codebase.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
85.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/CLI-3-add-telemetry branch 2 times, most recently from f249a2f to 14c7a39 Compare February 27, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants