GoogleCloudPlatform / GoogleCloudPlatform/stackdriver-errors-js

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

Aperta
#112 0 commenti 0 reazioni 1 assegnatario Rivendicata da @simonz130 Vedi su GitHub
Lingua principale
JavaScript
Stelle
360
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```js
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!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.