vscode-extension-telemetry icon indicating copy to clipboard operation
vscode-extension-telemetry copied to clipboard

`0.9.0` not sending telemetry information

Open mattseddon opened this issue 2 years ago • 7 comments

Thank you for the great package. We've been using it for a long time in vscode-dvc.

Last week shipped a version of the extension with 0.9.0 of @vscode/extension-telemetry included. As you can see from the below graph, we have experienced a significant drop off in activity since we shipped the update:

image

I have manually verified that there is an issue by installing the extension and triggering events. There were no issues in the extension telemetry output channel. However, no data is being received/recorded in Azure app insights for that session.

Please LMK if I have done something wrong and there is further config required to upgrade from 0.8.5 to 0.9.0.

Thanks

mattseddon avatar Nov 19 '23 21:11 mattseddon

Will take a look, we made a larger change in 0.9 to reduce bundle size, but maybe that somehow messed up the sending. I will investigate further and see what might be happening here 👍

lramos15 avatar Nov 20 '23 01:11 lramos15

I just tried out a test extension I have with 0.9.0 and I receive events. I've not needed to do anything to upgrade, the extension was previously using 0.8.5

lramos15 avatar Nov 20 '23 18:11 lramos15

@lramos15 could this have anything to do with sending custom properties with events? Nearly all of our events contain custom properties.

After reverting to 0.8.5 we've seen an uptick:

image

mattseddon avatar Nov 21 '23 22:11 mattseddon

@lramos15 could this have anything to do with sending custom properties with events? Nearly all of our events contain custom properties.

Not sure I follow? Could you share an example telemetry call with this custom properties

lramos15 avatar Nov 22 '23 14:11 lramos15

Not sure I follow?

I was wondering whether or not you sent properties: TelemetryEventProperties and/or measurements: TelemetryEventMeasurements when you tried out the test extension.

One example of a call to our sendTelemetryEvent function is below:

        sendTelemetryEvent(
          EventName.EXTENSION_LOAD,
          {
                cliAccessible: this.cliAccessible,
                dvcPathUsed: !!this.config.getCliPath(),
                dvcRootCount: this.getRoots().length,
                msPythonInstalled: this.config.isPythonExtensionInstalled(),
                msPythonUsed: await this.isPythonExtensionUsed(),
                pythonPathUsed: !!this.config.getPythonBinPath(),
                workspaceFolderCount: getWorkspaceFolderCount()
          },
          { duration: stopWatch.getElapsedTime() }
        )

the function sendTelemetryEvent sanitises the inputs and then calls the reporter like this:

  reporter.sendTelemetryEvent(
    eventName as string,
    { ...sanitizedProperties, user_id: getUserId() },
    measurements
  )

The code can be found here: https://github.com/iterative/vscode-dvc/blob/main/extension/src/telemetry/index.ts#L75

mattseddon avatar Nov 27 '23 03:11 mattseddon

Still trying to repro this but I am sending both properties and measurements without issue.

lramos15 avatar Dec 07 '23 21:12 lramos15

@mattseddon Can you reproduce with a basic hello world extension sample that just has telemetry?

lramos15 avatar Dec 12 '23 16:12 lramos15

Will close the issue as stale for now as I cannot reproduce but if you have an easy repro I would love to get this fixed for you

lramos15 avatar Apr 30 '24 16:04 lramos15

No worries, I don't have time to try and set one up. The extension that I was working on can stay on the old version. Thanks.

mattseddon avatar Apr 30 '24 22:04 mattseddon