我正在尝试使用 raven-js 捕获 js 错误。我有以下代码
...
try
rs.endsWith "#{rsp.source_identifier}/"
catch e
Raven.captureException(e, {extra:{rs: rs, app: app}})
我在哨兵中看到这个错误,但我没有看到额外的变量,例如 rs 和 app 。我看到的唯一额外内容是:
“会话:持续时间”:581889
在完整的错误 json 中,我看到以下内容:
"errors": [
{
"type": "invalid_attribute",
"name": "rs"
},
{
"type": "invalid_attribute",
"name": "app"
}
],
"extra": {
"session:duration": 581889
},
如何将此变量传递给哨兵,所以它们实际上出现在哨兵中?