microsoft / vscode-extension-telemetry

Node module to help VS Code extensions send telemetry using application insights
https://www.npmjs.com/package/@vscode/extension-telemetry
Other
125 stars 46 forks source link

Data sanitization for uncaught exception telemetry? #179

Closed Joouis closed 11 months ago

Joouis commented 1 year ago

Hi there,

We're building our extension with vscode-extension-telemetry package which is super easy to use, great work!

Just checking the telemetry data on App Insights after few weeks internal testing and found something abnormal. For the caught errors, we will save the error message to "customDimensions.errorMessage" field by usage event, and it's good to see that the content of this field would be sanitized like No module named 'xxx'<REDACTED: user-file-path> for the user local path. However, for the uncaught exception, the package will auto log the event name as "unhandlederror", and 3 fields in "customDimensions" may contain user local path shown as the screenshot below.

image

So the questions are:

lramos15 commented 1 year ago

This redaction and cleaning is all done by VS Code itself through its telemetry API.

I've created https://github.com/microsoft/vscode/pull/191331 to also run it on the error data

lramos15 commented 1 year ago

Closing since upstream issue has been merged