-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Adding GDPR annotations #34997
Merged
Merged
Adding GDPR annotations #34997
+1,383
−3
Conversation
This file contains 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.
This PR adds comments that describe our telemetry events. For each property of each event it adds what kind of data they contain and for what reason the data is collected.
How the annotations work
Let's assume we send the following event and the timer data is dynamic, i.e. the properties of
timer
can not known statically:The event is constructed in multiple steps, normally scattered across several files:
In order to extract the event descriptions with simple scanners we use specific comments to describe telemetry events and their properties. We place those comments as close as possible to where the events and properties are generated. The code above would be annotated as follows:
The comments are processed and result in the following "final" description of the
E1
event. Every property that starts withtimer.
such astimer.waited
is classified as system metadata that is collected for gaining insights into how the feature is being used.More about the syntax
All GDPR comments are tagged with one of the following tags and are otherwise well-formed
JSON
.__GDPR__
- describes the name and the properties of a telemetry event__GDPR__FRAGMENT__
- describes the name and the properties of a fragment of the data of an event, fragments are either included or inlined by other fragments or events__GDPR_COMMON__
- describes a property added to every telemetry eventEach property is described with an object that looks like this:
If
endPoint
is omitted, it defaults tonone
. That's appropriate for pretty much all properties with the exception of a couple of common properties.The values for
classification
are mostly self-explaining.EndUserPseudonymizedInformation
is what allows us to identify if two separate actions are performed by the same user, although we don't know who the user is.machineId
orinstanceId
fall in this category.PublicPersonalData
andPublicNonPersonalData
is information that users provide us with, for example, publisher information on the marketplace.CustomerContent
is information the user generated such as urls of repositories or custom snippets. Everything else isSystemMetaData
.purpose
is usuallyFeatureInsight
orPerformanceAndHealth
. Only events generated by NPS surveys are sent to gainBusinessInsight
.isMeasurement
is only used when describing properties that are added as custom measurements to events sent by VS Code extensions.Special constructs
${include}
If A includes B, this is equivalent to the union of A and B. Fragments are referenced using
${FragmentName}
.${inline}
If A inlines B at property P, all properties of B are added to A under the key
"P.<Name in B>"
. Fragments are referenced using${FragmentName}
.${wildcard}
Wildcards can be used as a temporary workaround to describe dynamic properties that have a common prefix. In the long run all dynamic properties need to be removed and be sent as values of a static property. A wild card is an array of wildcard entries. Each entry has a
${prefix}
and a${classification}
property. The value of${prefix}
is a string representing the common prefix of all properties it matches. The value of${classification}
is a property description detailed above.