Report telemetry data from the project generation wizard.#437
Report telemetry data from the project generation wizard.#437rgrunber merged 1 commit intoredhat-developer:masterfrom
Conversation
037f8a3 to
d537aeb
Compare
|
|
||
| const projectGenState: ProjectGenState = state as ProjectGenState; | ||
| await sendTelemetry(VSCodeCommands.CREATE_PROJECT, { | ||
| status: CMD_SUCCEED_VALUE, |
There was a problem hiding this comment.
status is set as succeeded even before we perform the actual project creation. So we'll never see any failure
There was a problem hiding this comment.
Right. I think I can create a separate helper that does the vscode.openFolder and reports the telemetry right before that. That should ensure we still report failure if something happens in the download/extraction of the project.
There was a problem hiding this comment.
@fbricon I've updated the PR to perform the telemetry reporting just before openProject(..) is called. There's just one issue :
If starting with a workspace that has no folders opened, and generating a Quarkus project from that, it still doesn't report the telemetry. I'm using sendTelemetry(...).then(() => openProject(projectDir)); . I can see :
vscode-redhat-telemetry: Event received: quarkusTools.createProject
vscode-redhat-telemetry: Sending 'track' event with
{"userId":"...","event":"quarkusTools.createProject","properties":{"status":"succeeded","buildTool":"Maven","shouldGenerateCode":true,"extensions":"io.quarkus:quarkus-agroal,io.quarkiverse.amazonservices:quarkus-amazon-dynamodb,io.quarkiverse.amazonservices:quarkus-amazon-iam","extension_name":"redhat.vscode-quarkus","extension_version":"1.9.1","app_name":"Visual Studio Code","app_version":"1.63.2","app_kind":"Desktop","app_remote":false}...}
in the debug log, but the event never ends up recorded. Is there some part of the telemetry reporting that doesn't finish immediately and would get interrupted by the eventual vscode.openFolder call ?
- Fixes redhat-developer#405 - Add boolean option to registerCommandWithTelemetry that delegates telemetry reporting to the command - perform telemetry directly in the project generation wizard. Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
d537aeb to
aa2f2c1
Compare
|
I think I'll merge this in for the upcoming release. There's a case where telemetry doesn't seem to be sent, but it's better to report some/most amounts than nothing at all. |
The project generation wizard has some cases where the
vscode.openFoldercommand may be called. In those cases, the extension is shut down / disposed and the command never returns, so we aren't actually reporting this type of telemetry in certain cases! This means we can't do telemetry in theregisterCommandWithTelemetrywrapper, and should do it just before the open folder logic.Also, I'm not yet sure why, but having
deactivate()return an empty Promise, restores the shutdown telemetry events for me, where before none were reported. Interestingly, the last reporting of ashutdownevent for me happened on Dec 8th with VS Code 1.62.3. 1.63.0 was released the same day so it looks like the update might have changed something.Signed-off-by: Roland Grunberg rgrunber@redhat.com