Requirements
Enhancing backtraces with sourcemaps requires each sample to be tagged with arevision of your application. This is used to determine when to fetch new sourcemaps after a deploy has changed your (front-end) code. You can specify the revision in the options given when creating a new AppSignal instance.
Public sourcemaps
With public sourcemaps, the sourcemap is hosted next to the JavaScript file. At the bottom of the minified JavaScript there needs to be a special comment to indicate that a sourcemap is available for the code.https://your.app/assets/application.min.js and the sourcemap comment looks like //# sourceMappingURL=application.min.js.map, we will attempt to retrieve the source map from the following URL: https://your.app/assets/application.min.js.map.
We attempt to cache public sourcemaps, but we may nonetheless request the minified version and the sourcemap file more than once.
Private sourcemaps
We usually recommend using public sourcemaps whenever possible, as builds that produce lots of sourcemaps can take a long time to upload via our private sourcemap endpoint. However, if that is not possible, you can also upload your sourcemaps to our sourcemaps API endpoint.Retention
Sourcemaps are grouped into a “release” by therevision string and we will keep the last “release” until a new revision is uploaded. Older “releases” will be kept for up to sixty days.