Bicep deploy - capture telemetry data for deployment start/end #6419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Capture telemetry data when deployment starts and ends. We will include requestId in the deploy start event. We will use the same requestId on language server side and send out another event when deployment succeeds/fails.
** TELEMETRY("vscode-bicep/deploy/start", 0.0.0-placeholder) properties={"deployId":"0.33096561271208325"}, measures={"duration":0}
node_modules/@microsoft/vscode-azext-utils/out/src/DebugReporter.js:21
** TELEMETRY("vscode-bicep/deploy/result", 0.0.0-placeholder) properties={"deployId":"0.33096561271208325","result":"Succeeded"}, measures={"duration":0}
node_modules/@microsoft/vscode-azext-utils/out/src/DebugReporter.js:21
** TELEMETRY("vscode-bicep/command/bicep.deploy", 0.0.0-placeholder) properties={"isActivationEvent":"false","lastStep":"quickPick|Selectaparameterfile","result":"Succeeded","stack":"","error":"","errorMessage":"","contextValue":"Uri","deployId":"0.33096561271208325","targetFile":"rightClick","targetScope":"subscription","treeItemSource":"treeItemPicker","accountStatus":"LoggedIn","x-ms-correlation-request-id":"02d76f39-c79d-4ac7-b025-a00221a9e7c9","parameterFileProvided":"false"}, measures={"duration":18.16}
** TELEMETRY("vscode-bicep/deploy/start", 0.0.0-placeholder) properties={"deployId":"0.9794717180067349"}, measures={"duration":0}
node_modules/@microsoft/vscode-azext-utils/out/src/DebugReporter.js:21
** TELEMETRY("vscode-bicep/deploy/result", 0.0.0-placeholder) properties={"deployId":"0.9794717180067349","result":"Failed"}, measures={"duration":0}
node_modules/@microsoft/vscode-azext-utils/out/src/DebugReporter.js:21
** TELEMETRY("vscode-bicep/command/bicep.deploy", 0.0.0-placeholder) properties={"isActivationEvent":"false","lastStep":"quickPick|Selectaparameterfile","result":"Succeeded","stack":"","error":"","errorMessage":"","contextValue":"Uri","deployId":"0.9794717180067349","targetFile":"rightClick","targetScope":"resourceGroup","treeItemSource":"treeItemPicker","accountStatus":"LoggedIn","parameterFileProvided":"false"}, measures={"duration":4.23}
We can use the default timestamps and deployId to match the events and calculate duration.