Explicitly convert properties to strings before uploading

This commit is contained in:
Matt Bierner 2021-05-25 18:30:18 -07:00
parent ad41b3a12b
commit 68efd480d0
No known key found for this signature in database
GPG key ID: 099C331567E11888

View file

@ -817,11 +817,15 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
}
*/
this.telemetryReporter.logTelemetry('completions.execute', {
duration: duration,
duration: String(duration),
type: response?.type ?? 'unknown',
count: response?.type === 'response' && response.body ? response.body.entries.length : 0,
updateGraphDurationMs: response?.type === 'response' ? response.performanceData?.updateGraphDurationMs : undefined,
createAutoImportProviderProgramDurationMs: response?.type === 'response' ? response.performanceData?.createAutoImportProviderProgramDurationMs : undefined,
count: String(response?.type === 'response' && response.body ? response.body.entries.length : 0),
updateGraphDurationMs: response?.type === 'response' && typeof response.performanceData?.updateGraphDurationMs === 'number'
? String(response.performanceData.updateGraphDurationMs)
: undefined,
createAutoImportProviderProgramDurationMs: response?.type === 'response' && typeof response.performanceData?.createAutoImportProviderProgramDurationMs === 'number'
? String(response.performanceData.createAutoImportProviderProgramDurationMs)
: undefined,
includesPackageJsonImport: includesPackageJsonImport ? 'true' : undefined,
includesImportStatementCompletion: includesImportStatementCompletion ? 'true' : undefined,
});