Skip to content

Commit 5857465

Browse files
authored
Fix over sanitization of user agents (microsoft#163665)
* Fix over sanitization of user agents * Better user agent test * Mix in common props after cleaning * Update comments
1 parent 686d568 commit 5857465

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/vs/platform/telemetry/common/telemetryService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ export class TelemetryService implements ITelemetryService {
110110

111111
return this._commonProperties.then(values => {
112112

113-
// (first) add common properties
114-
data = mixin(data, values);
115-
116-
// (next) add experiment properties
113+
// add experiment properties
117114
data = mixin(data, this._experimentProperties);
118115

119-
// (last) remove all PII from data
116+
// remove all PII from data
120117
data = cleanData(data as Record<string, any>, this._cleanupPatterns);
121118

119+
// add common properties
120+
data = mixin(data, values);
121+
122122
// Log to the appenders of sufficient level
123123
this._appenders.forEach(a => a.log(eventName, data));
124124

src/vs/platform/telemetry/common/telemetryUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ export function getPiiPathsFromEnvironment(paths: IPathEnvironment): string[] {
286286
* @returns The cleaned stack
287287
*/
288288
function anonymizeFilePaths(stack: string, cleanupPatterns: RegExp[]): string {
289+
289290
let updatedStack = stack;
290291

291292
const cleanUpIndexes: [number, number][] = [];

0 commit comments

Comments
 (0)