ember-cli-sentry / ember-cli-sentry

Error tracking via Sentry for Ember.js apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically enable sourcemaps

wireframe opened this issue · 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!