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

Implement Language Server Metrics #14245

Closed
tsmaeder opened this issue Aug 15, 2019 · 3 comments
Closed

Implement Language Server Metrics #14245

tsmaeder opened this issue Aug 15, 2019 · 3 comments
Labels
area/languages Issues related to Language extensions or plugins integration. kind/task Internal things, technical debt, and to-do tasks to be performed.
Milestone

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Aug 15, 2019

In #13270 we are asked to provide the following metrics:

The % of Language Servers requests that get a successful response
The % of Language Servers requests that get a successful response in under N seconds

Let's implement this as far as we can (see also #13375). We need to ensure that metrics have no negative impact on performance (e.g. no potentially blocking calls, etc.).

as we investigaged in #14017, our approach will be to instrument the plugin API, as this is our preferred way of implementing language support.

@tsmaeder tsmaeder added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Aug 15, 2019
@tsmaeder tsmaeder changed the title Implemente Language Server Metrics Implement Language Server Metrics Aug 15, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Aug 15, 2019
@tsmaeder tsmaeder mentioned this issue Aug 15, 2019
24 tasks
@tsmaeder tsmaeder added area/languages Issues related to Language extensions or plugins integration. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Aug 15, 2019
@tsmaeder tsmaeder mentioned this issue Aug 29, 2019
41 tasks
@JPinkney
Copy link
Contributor

JPinkney commented Sep 10, 2019

Because of microsoft/vscode-languageserver-node#517 there are a few more steps we will need to do before providing full metrics.

Currently, in https://github.com/JPinkney/theia-plugin-extension-metrics we can collect the number of errors that occur in a particular vscode extension by inspecting the output channel and using a regex to abstract the method that is erroring. Then we can keep track of the number of times this method inside of that output channel has errored.

A Prometheus metric would look something like:
language_server_error_metrics{id="YAML Support", method="textDocument/documentSymbol"} 3

where 3 is the number of times textDocument/documentSymbol failed inside of YAML Support.

Although this doesn't necessarily give us all the information we need it is a stepping stone towards future work for full support of these language metrics. In order to achieve full support we need to do a few things that can be done in a few different ways.

No matter what we will have to work on eclipse-theia/theia#6151 so that we can get the number of successful language requests that happen from a vscode extension id/particular output channel id.

Next we have two options on what we can do:

  1. Connect the output channel id from the output channel with the output channel id that we have from the previous step, allowing us to get all the metrics we want.
    This wont work because theres no way to get the output channel id from vscode-languageclient

Or

  1. Provide a mapping from vscode extension id's to their output channel so that we can connect the vscode extension id to a particular channels output id, allowing us to get all the metrics we want.

Obviously 1 is ideal because we don't have to manually provide a static mapping but it all depends on the implementation we can have for eclipse-theia/theia#6151.

@JPinkney
Copy link
Contributor

From what I can tell theres only a few things that need to be finished for this task:
[ ] eclipse-theia/theia#6214 needs to be merged
[ ] https://github.com/JPinkney/theia-plugin-extension-metrics needs to be published to npm
[ ] The published npm module as well as @theia/metrics need to be added to che-theia

Once those are done #13375 needs to be completed to be able to get the metrics to prometheus

@tsmaeder
Copy link
Contributor Author

PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/languages Issues related to Language extensions or plugins integration. kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

3 participants