[typescript-language-features] Add telemetry for package.json auto imports#103126
Merged
mjbvz merged 3 commits intomicrosoft:masterfrom Jul 22, 2020
Merged
Conversation
andrewbranch
commented
Jul 22, 2020
| ) { | ||
| /* __GDPR__ | ||
| "completions.execute" : { | ||
| "duration" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" }, |
Member
Author
There was a problem hiding this comment.
Note: I changed the classification of these properties at @amcasey’s request.
Member
There was a problem hiding this comment.
Generally speaking, numbers computed without consuming personal data are "SystemMetadata".
| type: response?.type ?? 'unknown', | ||
| count: response?.type === 'response' && response.body ? response.body.entries.length : 0, | ||
| updateGraphDurationMs: response?.type === 'response' ? response.performanceData?.updateGraphDurationMs : undefined, | ||
| includesPackageJsonImport: includesPackageJsonImport ? 'true' : undefined, |
Member
Author
There was a problem hiding this comment.
Is there a convention for modeling boolean properties? Boolean values aren’t allowed in the TelemetryProperties type.
Member
There was a problem hiding this comment.
There's this:
Member
Author
There was a problem hiding this comment.
Which produces 'true' or 'false' 👍. I suspect it’s just as easy to distinguish between 'true' and undefined as between 'true' and 'false' so I’m happy with this.
Collaborator
|
Looks good to me. Thanks! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Counterpart to microsoft/TypeScript#38923 (and #103037)
This is my first time messing with VS Code telemetry so I have some questions and need a careful review.
With microsoft/TypeScript#38923, we are potentially doing extra work to offer more auto-imports in completion items, so we want to validate that it’s worth it. So, this PR adds a property to the existing
completions.executeevent that says whether any of these extra items are included in the response, and adds a new event,completions.accept, fired upon accepting a completion item, that includes a property that says whether the accepted item was one of these extra auto-import completion items. Between these two events, we can determine how often the extra work was what the user wanted.