stackdriver-errors-js icon indicating copy to clipboard operation
stackdriver-errors-js copied to clipboard

Can I call `errorHandler.setUser()` before `errorHandler.start()`?

Open ZYinMD opened this issue 3 years ago • 0 comments

const errorHandler = new StackdriverErrorReporter();
errorHandler.setUser('some_user_id');
errorHandler.start({ ...config, service: 'some_service_name' });

README says setUser can be called "at any time", but I just want to confirm, can I call it before start()?

In my code, I call setUser() when user id becomes available, and call start() when service name becomes available, and I can't guarantee their order.

Thanks!

ZYinMD avatar Dec 14 '21 20:12 ZYinMD