rollbar-react-native icon indicating copy to clipboard operation
rollbar-react-native copied to clipboard

Support change environment while app is live

Open Ahmadhmaid777 opened this issue 1 year ago • 1 comments

My app supported change environment while is live my issue is I can't update rollbar config is there any way can I change or update rollbar configuration

Ahmadhmaid777 avatar Apr 19 '23 20:04 Ahmadhmaid777

I figure it out by setting up a new client with a new config, which should work if you want to change the configuration dynamically. Here is the example

 public setEnvironment = (environment: string) => {
        this.config = new Configuration(this.ROLLBAR_ACCESS_TOKEN, {
            environment: environment
        });

        this.client = new Client(this.config);
    };

mostasim avatar Apr 20 '23 11:04 mostasim