-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
plugin-ext-metrics extension for creating metrics from language plugins #6303
Conversation
59b95c4
to
dff03f3
Compare
dff03f3
to
803fc2f
Compare
I see during the build:
Please use vscode-languageserver-types of the same version which is used in core, i.e. ^3.15.0-next. If i remember correctly it is required in order to package electron distr. cc @kittaakos |
packages/plugin-ext-metrics/src/browser/plugin-metrics-languages-main.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/browser/plugin-metrics-output-registry.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/browser/plugin-metrics-languages-main.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/browser/plugin-metrics-output-registry.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/node/plugin-ext-metrics-backend-module.ts
Outdated
Show resolved
Hide resolved
803fc2f
to
832ca8a
Compare
832ca8a
to
7866d94
Compare
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.
I've looked through code, someone has to test that metrics are actually collected.
packages/plugin-ext-metrics/src/common/plugin-metrics-interfaces.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/node/plugin-ext-metrics-backend-module.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext-metrics/src/browser/plugin-metrics-resolver.ts
Outdated
Show resolved
Hide resolved
|
@JPinkney can you please add an output example of metrics endpoint? |
packages/plugin-ext-metrics/src/common/plugin-metrics-interfaces.ts
Outdated
Show resolved
Hide resolved
@skabashnyuk example would be something like:
|
7866d94
to
ca66fcf
Compare
@JPinkney I see |
It's also there, it just wasn't pasted in. Heres the full output:
|
@JPinkney ok I see
I have such a question: instead of |
@skabashnyuk For sure I can make that switch. How should I output the metric? like: where 4 is the number of successful requests? |
what about
|
ca66fcf
to
660916f
Compare
yes
yes and no. I want to see
|
81c0952
to
428b13a
Compare
@skabashnyuk so what you want are really not metrics, but raw events, right? If we go down that way, I would suggest we do it in a way that keeps computation of the metrics local to the front end: that would mean that the collection of events would be general, whereas the computation of metrics would be a che-specific Theia extension. |
Sort of. It's much easier to get different reports from raw data. |
@skabashnyuk Regarding:
is Would that be any different from this metric?
|
yes
I'm not sure metrics |
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
428b13a
to
b1a666a
Compare
I've updated the full metrics to be:
Do those capture all the metrics needed? |
I don't know, but they look fantastic. |
Any plans for this pr do be merged? |
@skabashnyuk Its just waiting for a +1 @akosyakov @benoitf Can you take a quick look again |
Some files don't match types or don't have |
@JPinkney can you take a look at @akosyakov's comment #6303 (comment) ? |
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.
@skabashnyuk it can be fixed as follow-ups, I forgot to select approve last time 🙈
@akosyakov, @skabashnyuk @JPinkney is away this week. Should I press "rebase and merge" before it needs another rebase? |
+1 It looks like it can be auto-rebased. The build failure on Mac seems to be accidental. |
PR was outdated and build failed |
@tolusha Oh, it broke the master:
Could you have a look at it or revert please? |
Looks like the type of LanguagesMainImpl changed 3 days ago to
Maybe @svenefftinge knows the correct fix to apply then? |
Changing the return type in LanguagesMainPluginMetrics to |
@akosyakov how to best provide a fix for this? |
I will create a PR. The fix seems simple |
|
||
private _extensionIDAnalytics: MetricsMap; | ||
|
||
private NODE_BASED_REGEX = /(?<=Request)(.*?)(?=failed)/; |
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.
Why not /Request(.*)failed/
?
What it does
This PR introduces a new extension that creates metrics from language plugins. It creates metrics for two specific instances:
The time it takes for a language server request to be made for a specific request for a specific plugin
E.g. vscode-yaml -> document symbols -> 13 ms
The percentage of success made for a specific request for a specific plugin
E.g. vscode-yaml -> document symbols -> 99% successful
Spectrum discussion: https://spectrum.chat/theia/dev/current-state-of-metrics-in-theia~8efd05d2-a25b-4629-a1b1-1dd8a0ccef96
Related issues:
eclipse-che/che#14245
How to test
For testing I used a modified version of vscode-yaml that errors randomly in document symbols (just so you don't have to go out and find a plugin that errors on a language server request): you can download from https://github.com/JPinkney/Sample-vsix-repo/blob/master/0.5.2-beta7.vsix
You can actually use anything in this list though: https://github.com/eclipse-theia/theia/compare/master...JPinkney:plugin-ext-metrics?expand=1#diff-fb56011c00b860bfb7d05eedd825006eR33 it's just easier to verify that the percentage of successes is working when you know how to generate an error in the plugin.
Play around with the extension (autocompletion, document symbols, etc, etc) just so that we can get some data for metrics.
After you've played around with it go to ${yourUrl}/metrics and you should see the updated analytics for language_server_success_metrics and language_server_time_metrics.
Review checklist
Reminder for reviewers