-
Notifications
You must be signed in to change notification settings - Fork 181
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
JS-498 Add runtime telemetry #5017
Conversation
sonar-plugin/bridge/src/main/java/org/sonar/plugins/javascript/bridge/BridgeServer.java
Outdated
Show resolved
Hide resolved
sonar-plugin/bridge/src/main/java/org/sonar/plugins/javascript/bridge/BridgeServer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better not to expose NodeCommand
outside of the bridge
module. We could instead just add more fields to the Telemetry
record
sonar-plugin/bridge/src/main/java/org/sonar/plugins/javascript/bridge/BridgeServer.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
@@ -111,8 +111,7 @@ void analyzeFiles(List<InputFile> inputFiles) throws IOException { | |||
) | |||
); | |||
} | |||
var telemetry = bridgeServer.getTelemetry(); | |||
new PluginTelemetry(context).reportTelemetry(telemetry); | |||
new PluginTelemetry(context, bridgeServer).reportTelemetry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional - I would only pass value from bridgeServer.getTelemtry()
instead of passing the whole bridgeServer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way, if telemetry is not available or not necessary to compute for some reason, we wouldn't be computing it.
JS-498
Adding runtime telemetry as per the bonus part of the MMF.
Refactoring the code a bit, so only querying the node server, if telemetry is actually enabled.