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

Always push telemetry/event notifications #109

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

vinistock
Copy link
Member

Motivation

This work is necessary to help address the problem described in Shopify/vscode-ruby-lsp#85.

It's brittle to let the plugin tell the server if telemetry/event notifications should be pushed or not. It's more robust to always send the notifications and just let the plugin decide whether to discard or do something with them.

Implementation

Removed the check for whether telemetry was enabled or not and also removed the ignored requests logic. It's much simpler to just send everything to the plugin and let it decide.

Automated Tests

Added the extra assertions expected from always sending telemetry notifications.

Manual Tests

  1. Start the plugin in debug mode using Remove plugin order dependency from telemetry vscode-ruby-lsp#85 and this PR's branch for the server
  2. Verify that telemetry events are printed in the debug console of the plugin window

@vinistock vinistock requested a review from a team May 16, 2022 19:46
@vinistock vinistock self-assigned this May 16, 2022
@vinistock vinistock force-pushed the vs/always_push_telemetry_events branch from 27caa48 to daf4c6b Compare May 31, 2022 13:42
@vinistock vinistock force-pushed the vs/always_push_telemetry_events branch from daf4c6b to be9284f Compare May 31, 2022 15:45
@vinistock
Copy link
Member Author

@paracycle in the second commit, I have refactored the with_telemetry method a bit. Let me know what you think.

lib/ruby_lsp/handler.rb Show resolved Hide resolved
@vinistock vinistock merged commit 0975c6e into main Jun 1, 2022
@vinistock vinistock deleted the vs/always_push_telemetry_events branch June 1, 2022 17:44
andyw8 referenced this pull request in andyw8/ruby-lsp Mar 2, 2024
…pt-4.7.3

Bump typescript from 4.7.2 to 4.7.3
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.

5 participants