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

Not able to unminify the stack trace in Azure Application Insights #198

Closed michaelprichardson closed 7 months ago

michaelprichardson commented 7 months ago

I am using this library to log errors in a VSCode extension. Everything works (I used this) and I can see the errors in the Azure Application Insights dashboard but the stack traces are minified.

The .map files are uploaded to a storage container and when I click the unminify checkbox Azure is unable to find the .map.

Screenshot 2024-01-27 at 11 21 58

On further investigation it's because the extension uses main.js and the map file has the format main.[fullhash].[version].map. I have tried changing the name of the main.js generated to be the same as the .map (main.[fullhash].[version].js) file but vsce is unable to package the extension as it's needs a main.js.

 ERROR  Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by '.vscodeignore':
  extension/dist/main.js

Any ideas how to get around this issue? My work around for now is to use this

lramos15 commented 7 months ago

I'm not super familiar with the way app insights does stack beautification and have only used custom tooling myself