ember-cli-sentry/ember-cli-sentry

Automatically enable sourcemaps

wireframe opened this issue ยท 8 comments

ember-cli disables sourcemaps in production mode which makes sentry's stacktraces pretty much unusable. It would be awesome to automatically enable sourcemaps with this addon so that stuff "just works".

If that's not possible or you'd want this to be an opt-in feature, it would be great to log a warning/error on startup that the deveoper needs to manually enable sourcemaps for sentry's stacktraces to be usable.

I had no idea about this. Explains why our new test-app with sentry is not tracked!
Probably saved me quite some debugging-time. Thanks! ๐Ÿ‘

@wireframe I also had no idea about this.

I actually don't know how to do this, but I'll have a look into it. If you happen to know how to do this, feel free to submit a PR ๐ŸŽ„

Could be possible by the config hook of Ember Addon

Just for the people who came here to look for a solution:

// ember-cli-build.js

var app = new EmberApp(defaults, {
  sourcemaps: {
    enabled: true
  }
});

Will enable sourcemaps for every build (even production).

๐ŸŽ‰ if @floqqi's answer solves this.

I included the sourcemaps: true option without testing that it was necessary, but in my sentry dashboard I do see stack traces with FULL function names, so I think it would be working.

Why does the readme link to this issue instead of just saying to use sourcemaps directly?

@robclancy legacy. PRs welcome!