getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
132 stars 34 forks source link

Clarify what globs are matched against #406

Open mjomble opened 1 year ago

mjomble commented 1 year ago

Here's the current documentation for sourcemaps.assets:

A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.

If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.

The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)

Use the debug option to print information about which files end up being uploaded.

My first question whenever I see an option like this is - what exactly is the glob pattern matched against?

And it always takes several rounds of trial and error until I figure out the answer.

The debug option is a nice touch and something I often look for in other tools when I find a similarly vague file pattern option. However, when I tried it, it didn't really show much more information than when I ran it without the option, at least regarding asset matching.

You could greatly boost the developer experience of using these plugins by adding some concrete examples, e.g. "if you're running the plugin in dir X and your assets are X/Y/Z.js and X/Y/Z.js.map, then you should use this exact glob"

PS. Thanks for Sentry, it's awesome! ❤️

lforst commented 1 year ago

Thanks for raising this. This is very valid feedback! I put this on our backlog because I am currently roped into other things.