Add more telemetry for project import & workspaces hash#4177
Merged
fbricon merged 4 commits intoredhat-developer:mainfrom Oct 24, 2025
Merged
Add more telemetry for project import & workspaces hash#4177fbricon merged 4 commits intoredhat-developer:mainfrom
fbricon merged 4 commits intoredhat-developer:mainfrom
Conversation
fbricon
reviewed
Oct 17, 2025
src/standardLanguageClient.ts
Outdated
| return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties); | ||
| await Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties); | ||
| } | ||
| } else if (e.name === Telemetry.IMPORT_PROJECT) { |
Collaborator
There was a problem hiding this comment.
for now can we skip this event and just send the workspace hash to the telemetry service?
Contributor
Author
There was a problem hiding this comment.
The idea of the event is to know how many import runs catastrophically fail and why. How would we know that if we don't report it to telemetry?
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
41ab508 to
c8298b0
Compare
fbricon
reviewed
Oct 21, 2025
src/standardLanguageClient.ts
Outdated
| const javaSettings = getJavaSettingsForTelemetry(workspace.getConfiguration()); | ||
|
|
||
| const properties= { ...e.properties, ...javaSettings }; | ||
| await Telemetry.sendTelemetry(Telemetry.STARTUP_EVT, ); |
Collaborator
There was a problem hiding this comment.
you should really send those properties ;-)
fbricon
reviewed
Oct 21, 2025
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
29b6f3d to
3c556e2
Compare
fbricon
reviewed
Oct 21, 2025
src/telemetry.ts
Outdated
| */ | ||
| export async function sendTelemetry(eventName: string, data?: any): Promise<void> { | ||
| export async function sendTelemetry(eventName: string, data?: object): Promise<void> { | ||
| console.log(`Sending telemetry event: ${eventName} with data: ${JSON.stringify(data)}`); |
Collaborator
There was a problem hiding this comment.
unnecessary as we already have logging from vscode-redhat-telemetry. If you don't see it in your debug console, make sure you run npm ci to see the latest version.
fbricon
reviewed
Oct 21, 2025
src/telemetry.ts
Outdated
| export const COMPLETION_EVENT = "textCompletion"; | ||
| export const SERVER_INITIALIZED_EVT = "java.workspace.initialized"; | ||
| export const LS_ERROR = "java.ls.error"; | ||
| export const IMPORT_PROJECT = "java.workspace.importProject"; |
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Collaborator
|
Thanks @tsmaeder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds code to forward "project import" telemetry from LS and adds a hash of the workspace folders to the all telemetry messages.
Fixes #4175
Companion PR to eclipse-jdtls/eclipse.jdt.ls#3544
How to test: I could only test this in the debugger since I don't have access to the telemetry data buckets.