Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bicep deploy - capture telemetry data for deployment start/end #6419

Merged
merged 8 commits into from
Apr 6, 2022

Conversation

bhsubra
Copy link
Contributor

@bhsubra bhsubra commented Apr 5, 2022

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.

  1. Successful deployment:

** 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}

  1. Failed deployment:

** 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.

@bhsubra bhsubra marked this pull request as draft April 5, 2022 19:06
@bhsubra bhsubra linked an issue Apr 5, 2022 that may be closed by this pull request
3 tasks
@bhsubra bhsubra marked this pull request as ready for review April 5, 2022 22:17
Copy link
Contributor

@StephenWeatherford StephenWeatherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments added

@bhsubra bhsubra force-pushed the dev/bhsubra/CaptureTelemetryDataForDeployStartAndEnd branch from f966ce6 to 13aa734 Compare April 6, 2022 19:17
Copy link
Contributor

@StephenWeatherford StephenWeatherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more requested change

Copy link
Contributor

@StephenWeatherford StephenWeatherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually you already fixed the problem. :shipit:

@bhsubra bhsubra merged commit dd9ea93 into main Apr 6, 2022
@bhsubra bhsubra deleted the dev/bhsubra/CaptureTelemetryDataForDeployStartAndEnd branch April 6, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bicep deploy - log additional telemetry
2 participants