-
Notifications
You must be signed in to change notification settings - Fork 223
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
Conversation
Signed-off-by: Yevhen Vydolob <[email protected]>
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fbricon WDYT?
There was a problem hiding this comment.
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()
Signed-off-by: Yevhen Vydolob <[email protected]>
Signed-off-by: Yevhen Vydolob <[email protected]>
What does this PR do?
Removes
yaml.server.initialized
and sendstartup
insteadWhat issues does this PR fix or reference?
Resolve #725
Is it tested? How?