Several environment variables are needed:
SOURCEMAP_DIR: the folder (relative to the app root) where the sourcemaps can be found
SOURCEMAP_SENTRY_TOKEN: an authentication token for the Sentry API. You can get it on the API page. The token needs the
SOURCEMAP_SENTRY_PROJECT: the organization and project slugs for you Sentry project. If your project is avaiable at
https://sentry.io/myorg/pyproject, then this variable should be
SOURCEMAP_URL_PREFIX: the prefix to prepend to each sourcemap. Can be a full URL (
https://example.com/dist/js/) or a tilde-based prefix (
~/dist/js/, see the documentation for details). Make sure to include the final slash if it's needed.
Then add this buildpack to your app:
heroku buildpacks:add https://github.com/Schnouki/buildpack-sentry-sourcemaps
And push a new relase.
The buildpack will use the current git commit number (environment variable
$SOURCE_VERSION) as the Sentry release. Make sure to add that in your app as
Copy the snippet above into CLI.