Skip to content

Commit

Permalink
Add telemetry for language server OutOfMemory events.
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Aug 15, 2024
1 parent edf98a9 commit 12bf134
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions USAGE_DATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vscode-java has opt-in telemetry collection, provided by [vscode-redhat-telemetr
* The extension name and the choice made when a recommendation to install a 3rd party extension is proposed
* The name of Java commands being manually executed, and any resulting errors
* The number of results (eg. 20), whether an error occured (eg. false), and duration (in milliseconds) when code assist is activated
* Whether the language server ran out of memory and the maximum allocated memory at which that occured (eg. 200m)

## What's included in the general telemetry data

Expand Down
3 changes: 3 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,9 @@ function registerOutOfMemoryDetection(storagePath: string) {
maxMem: getMaxMemFromConfiguration(true),
}
});
Telemetry.sendTelemetry("java.process.outofmemory", {
maxMem: getMaxMemFromConfiguration(true),
});
showOOMMessage();
serverStatusBarProvider.setError();
activationProgressNotification.hide();
Expand Down

0 comments on commit 12bf134

Please sign in to comment.