1

我正在尝试使用 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
  },

如何将此变量传递给哨兵,所以它们实际上出现在哨兵中?

4

1 回答 1

3

如果您向下滚动到问题视图的底部,这应该会显示在“附加数据”框下。

如果这对您不起作用,您可以联系我吗?我是 eric@getsentry.com。

于 2016-08-17T03:49:47.730 回答