Skip to content
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

Pass the projects manager to the telemetry manager in a safer manner. #2856

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Sep 15, 2023

@testforstephen
Copy link
Contributor

Should we add a property in TelemetryManager to indicate whether the project importer gets any errors or not?

@rgrunber
Copy link
Contributor Author

I could add it here to be part of the communication back through telemetry/event but I noticed we do send a notification to the client of the error at

connection.sendStatus(ServiceStatus.Error, e.getMessage());
.

As an example, vscode-java, takes advantage of this via. https://github.com/redhat-developer/vscode-java/blob/65cd8812a07a7fab26a924aa4bc20c4f5d894996/src/standardLanguageClient.ts#L164-L174 .

If you still want this, I can add the error to the telemetry event here.

@rgrunber rgrunber modified the milestone: End September 2023 Sep 19, 2023
Copy link
Contributor

@testforstephen testforstephen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have other ways to get the import failure, it's ok. When project import aborts with exception, time.projectsinitialized would be negative because this.projectsInitializedTime is not set. We can tell it's an aborted importing from this value as well.

projectInitElapsedTime = this.projectsInitializedTime - this.languageServerStartTime;
serviceReadyElapsedTime = this.serviceReadyTime - this.languageServerStartTime;
buildFinishedElapsedTime = buildFinishedTime - this.languageServerStartTime;
properties.add("buildToolNames", buildToolNamesList);
properties.addProperty("javaProjectCount", javaProjectCount);
if (sourceLevelMin != 0) {
properties.addProperty("compiler.source.min", Float.toString(sourceLevelMin));
}
if (sourceLevelMax != 0) {
properties.addProperty("compiler.source.max", Float.toString(sourceLevelMax));
}
properties.addProperty("time.projectsinitialized", Long.toString(projectInitElapsedTime));

@rgrunber rgrunber merged commit dc1fb02 into eclipse-jdtls:master Sep 20, 2023
4 checks passed
@rgrunber rgrunber deleted the fix-2842 branch September 20, 2023 13:00
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.

An internal error occurred during: "Initialize workspace"
2 participants