Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit 9a38600

Browse files
committed
GDPR annotations
1 parent 47b8268 commit 9a38600

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

src/chromeDebug.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ ChromeDebugSession.run(ChromeDebugSession.getSession(
2727
/* tslint:disable:no-var-requires */
2828
const debugAdapterVersion = require('../../package.json').version;
2929
logger.log(EXTENSION_NAME + ': ' + debugAdapterVersion);
30+
31+
// __GDPR__COMMON__ "Versions.DebugAdapter" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
3032
telemetry.telemetry.addCustomGlobalProperty({'Versions.DebugAdapter': debugAdapterVersion});

src/chromeDebugAdapter.ts

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,14 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
169169
public async configurationDone(): Promise<void> {
170170
if (this._userRequestedUrl) {
171171
// This means all the setBreakpoints requests have been completed. So we can navigate to the original file/url.
172-
this.chrome.Page.navigate({ url: this._userRequestedUrl }).then(() =>
173-
this.events.emitMilestoneReached('RequestedNavigateToUserPage'));
172+
this.chrome.Page.navigate({ url: this._userRequestedUrl }).then(() => {
173+
/* __GDPR__FRAGMENT__
174+
"StepNames" : {
175+
"RequestedNavigateToUserPage" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
176+
}
177+
*/
178+
this.events.emitMilestoneReached('RequestedNavigateToUserPage');
179+
});
174180
}
175181

176182
await super.configurationDone();
@@ -227,9 +233,28 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
227233
});
228234

229235
// Send the versions information as it's own event so we can easily backfill other events in the user session if needed
236+
/* __GDPR__FRAGMENT__
237+
"VersionInformation" : {
238+
"Versions.Target.CRDPVersion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
239+
"Versions.Target.Revision" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
240+
"Versions.Target.UserAgent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
241+
"Versions.Target.V8" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
242+
"Versions.Target.Project" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
243+
"Versions.Target.Version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
244+
"Versions.Target.Product" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
245+
"Versions.Target.NoUserAgentReason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
246+
"${include}": [ "${IExecutionResultTelemetryProperties}" ]
247+
}
248+
*/
249+
/* __GDPR__
250+
"target-version" : {
251+
"${include}": [ "${VersionInformation}" ]
252+
}
253+
*/
230254
versionInformationPromise.then(versionInformation => telemetry.telemetry.reportEvent('target-version', versionInformation));
231255

232256
// Add version information to all telemetry events from now on
257+
// __GDPR__COMMON__ "${include}": [ "${VersionInformation}" ]
233258
telemetry.telemetry.addCustomGlobalProperty(versionInformationPromise);
234259
});
235260
}
@@ -312,6 +337,11 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
312337

313338
private async spawnChrome(chromePath: string, chromeArgs: string[], env: {[key: string]: string},
314339
cwd: string, usingRuntimeExecutable: boolean, shouldLaunchUnelevated: boolean): Promise<ChildProcess> {
340+
/* __GDPR__FRAGMENT__
341+
"StepNames" : {
342+
"LaunchTarget.LaunchExe" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
343+
}
344+
*/
315345
this.events.emitStepStarted('LaunchTarget.LaunchExe');
316346
const platform = coreUtils.getPlatform();
317347
if (platform === coreUtils.Platform.Windows && shouldLaunchUnelevated) {
@@ -513,6 +543,12 @@ async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<st
513543

514544
coreUtils.fillErrorDetails(telemetryProperties, error);
515545

546+
/* __GDPR__
547+
"error" : {
548+
"semaphoreFileContent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
549+
"${include}": [ "${IExecutionResultTelemetryProperties}" ]
550+
}
551+
*/
516552
telemetry.telemetry.reportEvent('error', telemetryProperties);
517553

518554
return null;

0 commit comments

Comments
 (0)