microsoft/vscode-extension-telemetry

I can't use my own vscode.env.createTelemetryLogger to get error on version 0.8.0

freedom-git opened this issue · 4 comments

I reported a question before:
link: #152

To solve this issue, version 0.8.0 add a line of code:

throw new Error("Attempted to send error data when the @vscode/extension-telemetry module does not support it.");

As this package also use vscode.env.createTelemetryLogger, it will cause that any error happend in extension will trigger the above line, it will throw an error, and my own vscode.env.createTelemetryLogger listener will not even run.

Ah so you think we shouldn't throw and instead should just drop the error

Yeah, actually I don't think it is an error. Because I haven't call reporter.sendTelemetryErrorEvent or reporter.sendTelemetryException. I just import TelemetryReporter from '@vscode/extension-telemetry', and it start to throw error and make my own listener of vscode.env.createTelemetryLogger not working.

Well this is being triggered by the automatic error catching which the telemetry API does. So if your code throws some sort of error I assume we would call the sendTelemetryErrorEvent and then fail and throw an error causing a loop. Is that what is happening here?

Fixed by #158