GoogleCloudPlatform / GoogleCloudPlatform/stackdriver-errors-js

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

未关闭
#112 0 条评论 0 个 reaction 已指派 1 人 已被 @simonz130 认领 在 GitHub 查看
主要语言
JavaScript
星标
360
派生
54
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。