I have setup sourcemaps via the webpack config for sentry using what @danny had setup with Bugsnag. That is ok for Redwood Web side.
The reason I am looking into sentry is that they have an SDK that supports exception handling for serverless functions that is quite easy to integrate.
The one thing missing is how to provide Sentry a sourcemap of the API side so the correct line numbers and code show up in stack traces. The API side does not have a webpack config, but it does have a babel config.
As I get closer to launch with my redwood app, error tracking setup is one of the things I am trying to get right - as it’s critical to have one in production
@dthyresson has been taking lead on error handling in Redwood, I think you’ve already connected with him on Discord but pinging him here to get his input.
Was there ever a solution found for this? I’m encountering the same issue - I want to upload source maps to Sentry on the API side, and can’t see a way of including a custom Webpack config. Any help is appreciated!
// redwood.toml
[web]
title = "Redwood App"
port = 8910
apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
includeEnvironmentVariables = [
# Add any ENV vars that should be available to the web side to this array
# See https://redwoodjs.com/docs/environment-variables#web
]
# Source Map https://redwoodjs.com/docs/app-configuration-redwood-toml#web
sourceMap = true
and then the .js.map files will be generated in web/dist/assets on yarn rw build or yarn rw build web.
When I yarn rw build or yarn rw api, I get .map files: