Skip to content

Send startup event on LS start#744

Merged
evidolob merged 3 commits intoredhat-developer:mainfrom
evidolob:move-telemetry-init
Apr 25, 2022
Merged

Send startup event on LS start#744
evidolob merged 3 commits intoredhat-developer:mainfrom
evidolob:move-telemetry-init

Conversation

@evidolob
Copy link
Copy Markdown
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?

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested a review from fbricon April 12, 2022 07:13
@evidolob evidolob self-assigned this Apr 12, 2022
Comment thread src/extension.ts Outdated
});

runtime.telemetry.send({ name: 'yaml.server.initialized' });
runtime.telemetry.sendStartupEvent();
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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()

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested a review from fbricon April 25, 2022 09:36
Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
Comment thread src/extension.ts Outdated
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@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