@@ -22,6 +22,7 @@ export async function sendStartupTelemetry(
22
22
durations : IStartupDurations ,
23
23
stopWatch : IStopWatch ,
24
24
serviceContainer : IServiceContainer ,
25
+ isFirstSession : boolean ,
25
26
) {
26
27
if ( isTestExecution ( ) ) {
27
28
return ;
@@ -30,7 +31,7 @@ export async function sendStartupTelemetry(
30
31
try {
31
32
await activatedPromise ;
32
33
durations . totalNonBlockingActivateTime = stopWatch . elapsedTime - durations . startActivateTime ;
33
- const props = await getActivationTelemetryProps ( serviceContainer ) ;
34
+ const props = await getActivationTelemetryProps ( serviceContainer , isFirstSession ) ;
34
35
sendTelemetryEvent ( EventName . EDITOR_LOAD , durations , props ) ;
35
36
} catch ( ex ) {
36
37
traceError ( 'sendStartupTelemetry() failed.' , ex ) ;
@@ -76,7 +77,10 @@ export function hasUserDefinedPythonPath(resource: Resource, serviceContainer: I
76
77
: false ;
77
78
}
78
79
79
- async function getActivationTelemetryProps ( serviceContainer : IServiceContainer ) : Promise < EditorLoadTelemetry > {
80
+ async function getActivationTelemetryProps (
81
+ serviceContainer : IServiceContainer ,
82
+ isFirstSession ?: boolean ,
83
+ ) : Promise < EditorLoadTelemetry > {
80
84
// TODO: Not all of this data is showing up in the database...
81
85
82
86
// TODO: If any one of these parts fails we send no info. We should
@@ -88,7 +92,7 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
88
92
const terminalHelper = serviceContainer . get < ITerminalHelper > ( ITerminalHelper ) ;
89
93
const terminalShellType = terminalHelper . identifyTerminalShell ( ) ;
90
94
if ( ! workspaceService . isTrusted ) {
91
- return { workspaceFolderCount, terminal : terminalShellType } ;
95
+ return { workspaceFolderCount, terminal : terminalShellType , isFirstSession } ;
92
96
}
93
97
const interpreterService = serviceContainer . get < IInterpreterService > ( IInterpreterService ) ;
94
98
const mainWorkspaceUri = workspaceService . workspaceFolders ?. length
@@ -132,5 +136,6 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
132
136
usingUserDefinedInterpreter,
133
137
usingGlobalInterpreter,
134
138
appName,
139
+ isFirstSession,
135
140
} ;
136
141
}
0 commit comments