Shivang Tripathi
Shivang Tripathi

Reputation: 49

How to disable airbrake for specific user?

My ember application uses airbrake.io for reporting errors. Airbrake is added to the project using bower : https://github.com/balinterdi/ember-cli-airbrake

This will enable airbrake for all users for the application. Hence errors from all users will be sent to me via airbrake.

What I wanna do is disable/enable airbrake based on the user. Hence when the application loads, I want to be able to decide whether I should enable airbrake or not.

Ideas?

Upvotes: 1

Views: 207

Answers (1)

NullVoxPopuli
NullVoxPopuli

Reputation: 65083

You'll need to extend their service: https://github.com/balinterdi/ember-cli-airbrake/blob/master/addon/services/airbrake.js

And inject your current User service, or however you access the current User. Then ovorride whichever method is used for setup, and call super for when you want to invoke the original behavior

Upvotes: 0

Related Questions