【发布时间】:2021-09-09 23:03:12
【问题描述】:
目前,状态为 5xx 的服务器错误记录在哨兵中。
如何将 4xx 状态的错误记录为警告?
初始化哨兵:
Sentry.init({
dsn: 'https://server.com/8',
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({ app: server }),
new Tracing.Integrations.Postgres(),
new ExtraErrorDataIntegration(),
],
environment: 'ENV',
release: 'n/a',
tracesSampleRate: 1.0,
enabled: true,
});
【问题讨论】: