Dont sent telemetry in forks#21377
Merged
paulacamargo25 merged 22 commits intomicrosoft:mainfrom Jun 8, 2023
Merged
Conversation
…om/paulacamargo25/vscode-python into 20941-Dont-sent-telemetry-in-forks
…om/paulacamargo25/vscode-python into 20941-Dont-sent-telemetry-in-forks
karthiknadig
reviewed
Jun 6, 2023
| * @returns {boolean} | ||
| */ | ||
| export function isTelemetryDisabled(workspaceService: IWorkspaceService): boolean { | ||
| const settings = workspaceService.getConfiguration('telemetry').inspect<boolean>('enableTelemetry')!; |
Member
There was a problem hiding this comment.
Are we removing this setting?
Author
There was a problem hiding this comment.
I checked the code and we don't use that function anywhere.
karthiknadig
approved these changes
Jun 8, 2023
karrtikr
reviewed
Feb 29, 2024
Comment on lines
+48
to
+51
| export function isTelemetryDisabled(): boolean { | ||
| const packageJsonPath = path.join(EXTENSION_ROOT_DIR, 'package.json'); | ||
| const packageJson = fs.readJSONSync(packageJsonPath); | ||
| return !packageJson.enableTelemetry; |
There was a problem hiding this comment.
File I/O is expensive for this check, this is being done every time a telemetry is sent. See #22991.
Can we do this using setting instead of package.json? @paulacamargo25 @karthiknadig
Member
There was a problem hiding this comment.
you should have access to package json as a part of the extension API.
/**
* The parsed contents of the extension's package.json.
*/
readonly packageJSON: any;
karrtikr
pushed a commit
that referenced
this pull request
Mar 1, 2024
For #22991 Introduced by #21377 cc/ @DonJayamanne
wesm
pushed a commit
to posit-dev/positron
that referenced
this pull request
Apr 5, 2024
wesm
pushed a commit
to posit-dev/positron
that referenced
this pull request
Apr 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closed #20941