Send sourcemaps to Sentry

#1

I am configuring Sentry for our app with the ember-cli-sentry. I am able to log the errors on sentry as expected, but I can only view the error in the minified assets/vendor file.

I want to send the sourcemaps to sentry in order to have an easily readable error logging.

I also used the flag :


// ember-cli-build.js
sourcemaps: {
      enabled: true,
      extensions: ['js', 'coffee']
    }

but I still just the vendor.

My configuration until now:

// app.js

Sentry.init({
  dsn: 'my_dsn',
  integrations: [new Integrations.Ember()]
})


// config/deploy.js

    sentry: {
      publicUrl: 'http://localhost:4200',
      sentryUrl: 'https://sentry.io',
      sentryOrganizationSlug: 'my-org-slug',
      sentryProjectSlug: 'my-project-slug',
      sentryBearerApiKey: 'the_sentry_bearer_api_key'
    }

Am I missing something in my configuration? Cause the sourcemaps are still not send to Sentry. Is it an issue that I am testing this through localhost?

Thanks in advance!

#2

Yes, this is why. Through localhost, you can test that your events are properly posted. But you won’t get the proper stack traces in Sentry events.

To actually post your sourcemaps to Sentry, you’ll need to deploy your app. As a part of the deploy pipeline, your sourcempas will be uploaded to Sentry. On Sentry side, a set of sourcemaps is associated to a single deployed revision.