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

[vscode] support TelemetryLogger #12453

Merged
merged 1 commit into from
May 9, 2023

Conversation

rschnekenbu
Copy link
Contributor

@rschnekenbu rschnekenbu commented Apr 25, 2023

What it does

Fixes #12232

Add Telemetry support for extensions.
This adds the TelemetryLogger API and some additional types related to the TelemetryLogger. Telemetry is still declared as not enabled, so it won't change anything to the current behavior. However, extensions relying on Telemetry API will be able to run without any issues. As soon as the Telemetry API will be declared as mature enough, it will be possible to enable it with the support of preferences or a command line parameter (to be decided later).
TelemetrySender has no implementation, as this is really depending on the needs and the infrastructure of the extensions. This is basically the same for vscode, where an implementation using Application Insights is provided as an additional module.

Contributed on behalf of ST Microelectronics

How to test

Telemetry is still declared as not available according to: https://github.com/eclipsesource/theia/blob/bb71e70f6305b252aa5d663f0f73c1468b884821/packages/plugin-ext/src/plugin/telemetry-ext.ts#L20
So running the following actions won't produce anything until the flag is set to true.

  1. Install telemetry-sample extension (forked from vscode extension samples) - source
  2. Trigger the command Log Telemetry event. This will result on a notification on the test UI (directly displayed from the extension command before logging) and a log in the console if telemetry is activated. The log in the console is printed by the basic TelemetrySender provided in the sample. The logged data is cleaned as documented in the API (removal based on regex matching email, file path, Google key, etc.)
  3. The same can be done with the command Log Telemetry Exception

telemetry-sample

Note: No output is currently produced in the telemetry output channel as it is described in the vscode API. Goal of this task was only to initiate the main implementation.

Review checklist

Reminder for reviewers

packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/common/plugin-api-rpc.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
packages/plugin-ext/src/plugin/telemetry-ext.ts Outdated Show resolved Hide resolved
@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility CQ Required (deprecated) issues requiring a CQ (contributor questionnaire) labels Apr 25, 2023
@rschnekenbu
Copy link
Contributor Author

Thanks a lot for your review, @vince-fugnitto! I adressed most of the comments except the CQ one. I also rebased on the current master.

@JonasHelming
Copy link
Contributor

@vince-fugnitto The CQ has been approved, is this PR good to go from your POV or do you have other comments?

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍

  • the test plugin works as expected
  • the code looks good, and feedback based on duplication from @theia/core has been addressed
  • the CQ has been approved

packages/plugin-ext/src/plugin/types-impl.ts Show resolved Hide resolved
packages/plugin-ext/src/plugin/types-impl.ts Outdated Show resolved Hide resolved
resolves eclipse-theia#12232

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
@rschnekenbu
Copy link
Contributor Author

Hi @vince-fugnitto, I rebased on latest master, and I fixed the 2 minor issues (missing new lines).

@vince-fugnitto vince-fugnitto merged commit 934931f into eclipse-theia:master May 9, 2023
@tsmaeder tsmaeder mentioned this pull request May 11, 2023
11 tasks
tsmaeder pushed a commit to tsmaeder/theia that referenced this pull request May 23, 2023
Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
@vince-fugnitto vince-fugnitto added this to the 1.38.0 milestone May 25, 2023
erezmus pushed a commit to ARMmbed/theia that referenced this pull request Sep 18, 2023
Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
erezmus pushed a commit to ARMmbed/theia that referenced this pull request Sep 18, 2023
Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
erezmus pushed a commit to ARMmbed/theia that referenced this pull request Sep 21, 2023
Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
@erezmus erezmus mentioned this pull request Oct 4, 2023
1 task
erezmus pushed a commit to ARMmbed/theia that referenced this pull request Oct 5, 2023
Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
erezmus added a commit to ARMmbed/theia that referenced this pull request Oct 11, 2023
* vscode: add `TelemetryLogger` support (eclipse-theia#12453)

Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>

---------

Signed-off-by: Remi Schnekenburger <[email protected]>
Co-authored-by: Remi Schnekenburger <[email protected]>
erezmus added a commit to ARMmbed/theia that referenced this pull request Oct 20, 2023
* vscode: add `TelemetryLogger` support (eclipse-theia#12453)

Closes: eclipse-theia#12232

The commit adds support for the `TelemetryLogger` VS Code API in addition to other related functionality.

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>

---------

Signed-off-by: Remi Schnekenburger <[email protected]>
Co-authored-by: Remi Schnekenburger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CQ Required (deprecated) issues requiring a CQ (contributor questionnaire) vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Support telemetry API
3 participants