File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ export class Extension {
307307 const selection = await this . showRestartWindow ( ) ;
308308 sendInfo ( "" , {
309309 kind : "wrapperPropertiesChangedReloadRequest" ,
310- data2 : selection === OPT_RESTART ? "true" : "false" ,
310+ data3 : selection === OPT_RESTART ? "true" : "false" ,
311311 } ) ;
312312 if ( selection === OPT_RESTART ) {
313313 await this . restartServer ( ) ;
@@ -345,7 +345,7 @@ export class Extension {
345345 const selection = await this . showRestartWindow ( ) ;
346346 sendInfo ( "" , {
347347 kind : "javaHomeChangedReloadRequest" ,
348- data2 : selection === OPT_RESTART ? "true" : "false" ,
348+ data3 : selection === OPT_RESTART ? "true" : "false" ,
349349 } ) ;
350350 if ( selection === OPT_RESTART ) {
351351 await this . restartServer ( ) ;
Original file line number Diff line number Diff line change @@ -75,12 +75,12 @@ export class BuildServerController implements Disposable {
7575 kind : "bsp-error" ,
7676 operationName : jsonObj . operationName ,
7777 rootCauseMessage,
78- trace,
78+ traceLog : jsonObj [ trace ] ,
7979 } ) ;
8080 } else {
8181 sendInfo ( "" , {
8282 kind : kind ,
83- data2 : JSON . stringify ( rest ) ,
83+ data3 : JSON . stringify ( rest ) ,
8484 ...( schemaVersion && { schemaVersion : schemaVersion } ) ,
8585 } ) ;
8686 }
@@ -150,7 +150,7 @@ export class BuildServerController implements Disposable {
150150 machineStatus . hasProjectAtWorkspaceRoot = ( await this . hasProjectAtWorkspaceRoot ( ) ) . toString ( ) ;
151151 sendInfo ( "" , {
152152 kind : "machineStatus" ,
153- data2 : JSON . stringify ( machineStatus ) ,
153+ data3 : JSON . stringify ( machineStatus ) ,
154154 } ) ;
155155 }
156156
Original file line number Diff line number Diff line change 11import * as vscode from "vscode" ;
22import { initializeFromJsonFile , instrumentOperation } from "vscode-extension-telemetry-wrapper" ;
3-
43import { Api } from "./api" ;
54import { Extension } from "./Extension" ;
5+ import { TelemetryFilter } from "./util/telemetryFilter" ;
66
77let extension : Extension ;
88
99export async function activate ( context : vscode . ExtensionContext ) : Promise < Api > {
10- await initializeFromJsonFile ( context . asAbsolutePath ( "./package.json" ) ) ;
10+ await initializeFromJsonFile ( context . asAbsolutePath ( "./package.json" ) , {
11+ replacementOptions : [ TelemetryFilter . hideUrlOption ] ,
12+ } ) ;
1113 return instrumentOperation ( "activation" , activateExtension ) ( context ) ;
1214}
1315
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export class Logger {
5656 this . log ( error , LogVerbosity . ERROR ) ;
5757 sendInfo ( "" , {
5858 kind : "gradleTaskServerError" ,
59- data2 : error ,
59+ data3 : error ,
6060 } ) ;
6161 }
6262
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export class GradleServer {
127127 ) ;
128128 sendInfo ( "" , {
129129 kind : "serverProcessExitRestart" ,
130- data2 : selection === OPT_RESTART ? "true" : "false" ,
130+ data3 : selection === OPT_RESTART ? "true" : "false" ,
131131 } ) ;
132132 if ( selection === OPT_RESTART ) {
133133 await commands . executeCommand ( "workbench.action.restartExtensionHost" ) ;
@@ -169,7 +169,7 @@ export class GradleServer {
169169 private async handleServerStartError ( code : number | null ) : Promise < void > {
170170 sendInfo ( "" , {
171171 kind : "serverProcessExit" ,
172- data2 : code ? code . toString ( ) : "" ,
172+ data3 : code ? code . toString ( ) : "" ,
173173 } ) ;
174174 await this . showRestartMessage ( ) ;
175175 }
Original file line number Diff line number Diff line change 1+ import { ReplacementOption } from "@vscode/extension-telemetry" ;
2+
3+ export class TelemetryFilter {
4+ public static hideUrlOption : ReplacementOption = {
5+ lookup : / h t t p s ? : \/ \/ [ ^ : \s ] + : [ ^ @ \s ] + @ [ ^ \s ] + / g, // match URLs with embedded credentials
6+ replacementString : "<REDACTED: sensitive-url>" ,
7+ } ;
8+ }
You can’t perform that action at this time.
0 commit comments