Allow users to specify js sourcemap file patterns in datadog-ci sourcemaps upload
#1374
Labels
enhancement
New feature or request
rum
Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps]
Feature request description
Our front-end build pipeline (rails, sprockets, webpack) produces map files with filenames like
[name].js-[digest].map
. This is also true of an out-of-the-box installation of a rails app created withrails new -j webpack
.These filenames aren't seen as valid map files by the
getMatchingSourcemapFiles()
method inupload.ts
.Solution
Add an optional glob argument to
getMatchingSourcemapFiles()
that is used to get the sourcemap files from the given folder. The glob pattern can be passed in from the command line for users whose frontend pipeline creates sourcemap files with a different filename.e.g.
Additional context
Another option is to loosen up the existing glob pattern with something that will always match the current one, so it's backwards compatible (e.g.
**/*.js*.map
)I'd be happy to prepare a PR for this.
Command
sourcemaps
The text was updated successfully, but these errors were encountered: