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 55
66import { LanguageServerSetup , LanguageServerSetupStage , telemetry } from '../../telemetry/telemetry'
77import { tryFunctions } from '../../utilities/tsUtils'
8+ import { AuthUtil } from '../../../codewhisperer/util/authUtil'
89
910/**
1011 * 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>(
2021) {
2122 return await telemetry . languageServer_setup . run ( async ( span ) => {
2223 span . record ( { languageServerSetupStage : stageName } )
24+ span . record ( { credentialStartUrl : AuthUtil . instance . startUrl ?? 'Undefined' } )
2325 const result = await runStage ( )
2426 if ( getMetadata ) {
2527 span . record ( getMetadata ( result ) )
Original file line number Diff line number Diff line change 205205 " AWSProduct" ,
206206 " AWSProductVersion" ,
207207 " ClientID" ,
208- " MetricData"
208+ " MetricData" ,
209+ " CredentialStartUrl"
209210 ],
210211 "members" :{
211212 "AWSProduct" :{"shape" :" AWSProduct" },
217218 "ComputeEnv" : {"shape" :" ComputeEnv" },
218219 "ParentProduct" :{"shape" :" Value" },
219220 "ParentProductVersion" :{"shape" :" Value" },
220- "MetricData" :{"shape" :" MetricData" }
221+ "MetricData" :{"shape" :" MetricData" },
222+ "CredentialStartUrl" : {"shape" :" Value" }
221223 }
222224 },
223225 "Sentiment" :{
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import globals from '../extensionGlobals'
1717import { DevSettings } from '../settings'
1818import { ClassToInterfaceType } from '../utilities/tsUtils'
1919import { getComputeEnvType , getSessionId } from './util'
20+ import { AuthUtil } from '../../codewhisperer/util/authUtil'
2021
2122export const accountMetadataKey = 'awsAccount'
2223export const regionKey = 'awsRegion'
@@ -112,6 +113,7 @@ export class DefaultTelemetryClient implements TelemetryClient {
112113 ParentProduct : vscode . env . appName ,
113114 ParentProductVersion : vscode . version ,
114115 MetricData : batch ,
116+ CredentialStartUrl : AuthUtil . instance . startUrl ?? 'Undefined' ,
115117 } )
116118 . promise ( )
117119 this . logger . info ( `telemetry: sent batch (size=${ batch . length } )` )
Original file line number Diff line number Diff line change 12211221 "required" : false
12221222 }
12231223 ]
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+ ]
12241260 }
12251261 ]
12261262}
You can’t perform that action at this time.
0 commit comments