File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import { LanguageServerSetup , LanguageServerSetupStage , telemetry } from '../../telemetry/telemetry'
7
7
import { tryFunctions } from '../../utilities/tsUtils'
8
+ import { AuthUtil } from '../../../codewhisperer/util/authUtil'
8
9
9
10
/**
10
11
* Runs the designated stage within a telemetry span and optionally uses the getMetadata extractor to record metadata from the result of the stage.
@@ -20,6 +21,7 @@ export async function lspSetupStage<Result>(
20
21
) {
21
22
return await telemetry . languageServer_setup . run ( async ( span ) => {
22
23
span . record ( { languageServerSetupStage : stageName } )
24
+ span . record ( { credentialStartUrl : AuthUtil . instance . startUrl ?? 'Undefined' } )
23
25
const result = await runStage ( )
24
26
if ( getMetadata ) {
25
27
span . record ( getMetadata ( result ) )
Original file line number Diff line number Diff line change 205
205
" AWSProduct" ,
206
206
" AWSProductVersion" ,
207
207
" ClientID" ,
208
- " MetricData"
208
+ " MetricData" ,
209
+ " CredentialStartUrl"
209
210
],
210
211
"members" :{
211
212
"AWSProduct" :{"shape" :" AWSProduct" },
217
218
"ComputeEnv" : {"shape" :" ComputeEnv" },
218
219
"ParentProduct" :{"shape" :" Value" },
219
220
"ParentProductVersion" :{"shape" :" Value" },
220
- "MetricData" :{"shape" :" MetricData" }
221
+ "MetricData" :{"shape" :" MetricData" },
222
+ "CredentialStartUrl" : {"shape" :" Value" }
221
223
}
222
224
},
223
225
"Sentiment" :{
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import globals from '../extensionGlobals'
17
17
import { DevSettings } from '../settings'
18
18
import { ClassToInterfaceType } from '../utilities/tsUtils'
19
19
import { getComputeEnvType , getSessionId } from './util'
20
+ import { AuthUtil } from '../../codewhisperer/util/authUtil'
20
21
21
22
export const accountMetadataKey = 'awsAccount'
22
23
export const regionKey = 'awsRegion'
@@ -112,6 +113,7 @@ export class DefaultTelemetryClient implements TelemetryClient {
112
113
ParentProduct : vscode . env . appName ,
113
114
ParentProductVersion : vscode . version ,
114
115
MetricData : batch ,
116
+ CredentialStartUrl : AuthUtil . instance . startUrl ?? 'Undefined' ,
115
117
} )
116
118
. promise ( )
117
119
this . logger . info ( `telemetry: sent batch (size=${ batch . length } )` )
Original file line number Diff line number Diff line change 1221
1221
"required" : false
1222
1222
}
1223
1223
]
1224
+ },
1225
+ {
1226
+ "name" : " languageServer_setup" ,
1227
+ "description" : " Sets up a language server" ,
1228
+ "unit" : " Milliseconds" ,
1229
+ "passive" : true ,
1230
+ "metadata" : [
1231
+ {
1232
+ "type" : " id" ,
1233
+ "required" : true
1234
+ },
1235
+ {
1236
+ "type" : " languageServerSetupStage" ,
1237
+ "required" : true
1238
+ },
1239
+ {
1240
+ "type" : " languageServerLocation" ,
1241
+ "required" : false
1242
+ },
1243
+ {
1244
+ "type" : " languageServerVersion" ,
1245
+ "required" : false
1246
+ },
1247
+ {
1248
+ "type" : " manifestLocation" ,
1249
+ "required" : false
1250
+ },
1251
+ {
1252
+ "type" : " manifestSchemaVersion" ,
1253
+ "required" : false
1254
+ },
1255
+ {
1256
+ "type" : " credentialStartUrl" ,
1257
+ "required" : false
1258
+ }
1259
+ ]
1224
1260
}
1225
1261
]
1226
1262
}
You can’t perform that action at this time.
0 commit comments