key
- Type:
string
namespace
- Type:
string - Default value:
"frontend"
revision
- Type:
string
abc0123) or a version number (1.2.3). Read more about deploy markers and choosing a revision value.
ignoreErrors
- Type:
RegExp[]
message property of any error reported to AppSignal. If any of the regular expressions matches, the error is ignored. Read more in our ignoring errors guide.
matchBacktracePaths
- Type:
RegExp | Function | (RegExp | Function)[]
undefined. These functions will be called with the backtrace line paths of errors reported to AppSignal. If a non-empty string is returned by any of the functions, the path in the backtrace line is replaced with the returned string.
This is useful when the path at which your application is deployed is not known ahead of time. For example, the path to an
Electron application may be different on each user’s machine. You can match for the part of that path that is known to represent
your application.
For example, if your application’s source code is located at a path like the following, where ${USERNAME} changes for each user:
bundle/app.js.
This ensures that errors reported to AppSignal are grouped correctly when using backtrace line grouping, and allows for private sourcemaps to be uploaded for the cleaned path.
Matching with a function
Use a function to replace the whole path with a name you choose. For example, an Expo app’s bundle path ends in a hash that changes on every device and every update:index.android.bundle on Android and index.ios.bundle on iOS. You then upload each platform’s sourcemap under that name.