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

Send startup event on LS start #744

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

evidolob
Copy link
Collaborator

What does this PR do?

Removes yaml.server.initialized and send startup instead

What issues does this PR fix or reference?

Resolve #725

Is it tested? How?

@evidolob evidolob requested a review from fbricon April 12, 2022 07:13
@evidolob evidolob self-assigned this Apr 12, 2022
src/extension.ts Outdated
@@ -176,8 +177,7 @@ export function startClient(
client.onRequest(FSReadFile.type, (fsPath: string) => {
return workspace.fs.readFile(Uri.file(fsPath)).then((uint8array) => new TextDecoder().decode(uint8array));
});

runtime.telemetry.send({ name: 'yaml.server.initialized' });
runtime.telemetry.sendStartupEvent();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we send a boolean, for (un)successful startup?, and an error message in case of unsuccessful startup

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the sendStartupEvent doesn't have any parameters, we already send all LS errors, including startup errors.
Or you mean, do not use sendStartupEvent and instead send some { name: 'yaml.server.initialized', successful : true/false } ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@fbricon WDYT?

Copy link
Contributor

@fbricon fbricon Apr 25, 2022

Choose a reason for hiding this comment

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

You can manually craft a startup event like:

{ 
name: 'startup', 
 properties: {
   'yaml.server.initialized' : true/false,
   'error': the error message if the server failed to initialize
 }
}

In that case, you wouldn't call sendStartupEvent()

@evidolob evidolob requested a review from fbricon April 25, 2022 09:36
src/extension.ts Outdated Show resolved Hide resolved
src/extension.ts Outdated Show resolved Hide resolved
src/extension.ts Outdated Show resolved Hide resolved
src/extension.ts Outdated Show resolved Hide resolved
@evidolob evidolob merged commit 29d21f2 into redhat-developer:main Apr 25, 2022
@evidolob evidolob deleted the move-telemetry-init branch April 25, 2022 14:02
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.

Combine yaml.server.initialized event with the startup event
4 participants