SLCORE-2244 Implement IDESupportedLanguageViewed Gessie telemetry event#1926
SLCORE-2244 Implement IDESupportedLanguageViewed Gessie telemetry event#1926nquinquenel wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new Gessie telemetry event (Analytics.IDE.IDESupportedLanguageViewed) emitted when the user opens the IDE “Supported Languages” view, wiring it end-to-end from RPC notification through backend telemetry and into Gessie event posting.
Changes:
- Added a new RPC notification (
supportedLanguageViewed) and params DTO to report the UI action from client to backend. - Implemented a new Gessie payload type (
IDESupportedLanguageViewedPayload) and generalized Gessie metadata construction via aGessieEventPayloadinterface. - Added backend logic to enrich the event with local user id + connection-related info, plus medium/unit tests to verify behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rpc-protocol/.../SupportedLanguageViewedParams.java | New RPC params DTO carrying configScopeId. |
| rpc-protocol/.../TelemetryRpcService.java | Adds supportedLanguageViewed JSON notification to the telemetry RPC contract. |
| backend/rpc-impl/.../TelemetryRpcServiceDelegate.java | Wires the new RPC notification to TelemetryService.supportedLanguageViewed(...). |
| backend/core/.../TelemetryService.java | Builds and forwards IDESupportedLanguageViewedPayload to GessieService (incl. user id + OS + connection info). |
| backend/core/.../TelemetryServerAttributesProvider.java | Resolves optional connection-related info for Gessie payloads from effective binding. |
| backend/core/.../GessieConnectionInfo.java | New record to transport resolved connection info (type/user/org/installation). |
| backend/telemetry/.../event/payload/GessieEventPayload.java | New interface to provide event type/version generically for metadata building. |
| backend/telemetry/.../event/payload/MessagePayload.java | Updated to implement GessieEventPayload and define type/version constants. |
| backend/telemetry/.../event/payload/IDESupportedLanguageViewedPayload.java | New payload record for the IDESupportedLanguageViewed event. |
| backend/telemetry/.../GessieService.java | Refactors posting via generic metadata builder and adds API to post supported-language-viewed event. |
| backend/core/src/test/.../TelemetryServiceTests.java | Unit tests for gating/enrichment behavior of supportedLanguageViewed. |
| backend/telemetry/src/test/.../GessieServiceTests.java | Unit test verifying correct event metadata/payload posting for the new event. |
| medium-tests/.../GessieSupportedLanguageViewedMediumTests.java | Medium tests verifying HTTP event emission behavior (enabled/disabled, bound/unbound scopes). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...d/telemetry/src/main/java/org/sonarsource/sonarlint/core/telemetry/gessie/GessieService.java
Show resolved
Hide resolved
backend/core/src/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryService.java
Outdated
Show resolved
Hide resolved
c76d18f to
363fb81
Compare
SummaryAdds a new RPC method to record Gessie telemetry when users open the "Supported Languages" view in the IDE. The event captures local user ID, product version, OS, and connection context (SonarQube/SonarCloud binding details) to provide usage insights. Implementation includes a new GessieEventPublisher that resolves connection info from the config scope and guards against missing telemetry opt-in or user IDs. What reviewers should knowWhere to start:
Non-obvious decisions:
Files to review carefully:
|
There was a problem hiding this comment.
Pull request overview
Implements the new Gessie telemetry event Analytics.IDE.IDESupportedLanguageViewed end-to-end, exposing it through the RPC protocol and wiring it through the backend telemetry services.
Changes:
- Added a new RPC notification (
supportedLanguageViewed) and its params DTO to let IDE clients report opening the “Supported Languages” view. - Implemented a new Gessie payload (
IDESupportedLanguageViewedPayload) and refactoredGessieServiceto post events via a common payload interface (GessieEventPayload). - Added unit + medium tests validating payload composition and HTTP posting behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
rpc-protocol/.../SupportedLanguageViewedParams.java |
New RPC params DTO carrying configScopeId. |
rpc-protocol/.../TelemetryRpcService.java |
Adds supportedLanguageViewed JSON notification to the RPC interface. |
backend/rpc-impl/.../TelemetryRpcServiceDelegate.java |
Delegates the new RPC notification to TelemetryService. |
backend/core/.../TelemetryService.java |
Builds and sends the new Gessie event payload, including OS + connection info. |
backend/core/.../TelemetryServerAttributesProvider.java |
Adds helper to resolve connection-related info for the payload. |
backend/core/.../GessieConnectionInfo.java |
New record representing resolved connection info for Gessie events. |
backend/telemetry/.../GessieService.java |
Refactors posting into generic postEvent and adds supportedLanguageViewed. |
backend/telemetry/.../event/payload/GessieEventPayload.java |
New interface for payloads to supply event type/version. |
backend/telemetry/.../event/payload/MessagePayload.java |
Updated to implement GessieEventPayload and expose type/version constants. |
backend/telemetry/.../event/payload/IDESupportedLanguageViewedPayload.java |
New payload record for the Supported Languages viewed event. |
backend/telemetry/.../GessieServiceTests.java |
New unit tests for enablement + event posting correctness. |
backend/core/.../TelemetryServiceTests.java |
Extends unit tests to cover supportedLanguageViewed payload creation. |
medium-tests/.../GessieSupportedLanguageViewedMediumTests.java |
Adds medium tests validating HTTP calls made to the Gessie endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
medium-tests/src/test/java/mediumtest/gessie/GessieSupportedLanguageViewedMediumTests.java
Show resolved
Hide resolved
...rc/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryServerAttributesProvider.java
Outdated
Show resolved
Hide resolved
backend/core/src/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryService.java
Outdated
Show resolved
Hide resolved
363fb81 to
d5014b1
Compare
backend/core/src/main/java/org/sonarsource/sonarlint/core/telemetry/GessieConnectionInfo.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryServerAttributesProvider.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryServerAttributesProvider.java
Outdated
Show resolved
Hide resolved
backend/core/src/main/java/org/sonarsource/sonarlint/core/telemetry/TelemetryService.java
Outdated
Show resolved
Hide resolved
backend/core/src/test/java/org/sonarsource/sonarlint/core/telemetry/TelemetryServiceTests.java
Outdated
Show resolved
Hide resolved
medium-tests/src/test/java/mediumtest/gessie/GessieSupportedLanguageViewedMediumTests.java
Outdated
Show resolved
Hide resolved
| public void supportedLanguageViewed(String configScopeId) { | ||
| if (!gessieService.isEnabled()) { |
There was a problem hiding this comment.
Not sure about this one, but a food for thought.
I am not sure if this method belongs here. Yes, it is telemetry, but Gessie is also a separate thing. And it also makes you expose gessieService.isEnabled() to the outside.
It would make more sense for the method to be in GessieService (or some new class that would use it and have isEnabled logic there) and use it directly in TelemetryRpcServiceDelegate. So it's all telemetry but implementations are different and not reference each other.
There was a problem hiding this comment.
I kinda agree, I still want to have this enablement check in this method to avoid computing all this if telemetry is disabled.
I created a dedicated GessieEventPublisher class, to support the logic of such events related to Gessie, to avoid having them in TelemetryService class.
GessieService is focused on the HOW to send event, while GessieEventPublisher focuses on WHAT data to gather.
638a5dc to
92d8af4
Compare
92d8af4 to
cd9b1d1
Compare
|




No description provided.