Skip to content
代码片段 群组 项目
未验证 提交 b16d0e55 编辑于 作者: Elwyn Benson's avatar Elwyn Benson 提交者: GitLab
浏览文件

Merge branch '503490-frontend-sentry-alerts-are-noisy' into 'master'

Ignore Network errors reporting to Sentry

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173389



Merged-by: default avatarElwyn Benson <ebenson@gitlab.com>
Approved-by: default avatarBriley Sandlin <bsandlin@gitlab.com>
Approved-by: default avatarElwyn Benson <ebenson@gitlab.com>
Co-authored-by: default avatarMiguel Rincon <mrincon@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -25,6 +25,12 @@ const initSentry = () => { ...@@ -25,6 +25,12 @@ const initSentry = () => {
environment: gon.sentry_environment, environment: gon.sentry_environment,
autoSessionTracking: true, autoSessionTracking: true,
ignoreErrors: [
// Network errors create noise in Sentry and can't be fixed, ignore them.
/Network Error/i,
/NetworkError/i,
],
// Browser tracing configuration // Browser tracing configuration
enableTracing: true, enableTracing: true,
tracePropagationTargets: [/^\//], // only trace internal requests tracePropagationTargets: [/^\//], // only trace internal requests
......
...@@ -67,6 +67,7 @@ describe('SentryConfig', () => { ...@@ -67,6 +67,7 @@ describe('SentryConfig', () => {
allowUrls: [mockGitlabUrl, 'webpack-internal://'], allowUrls: [mockGitlabUrl, 'webpack-internal://'],
environment: mockEnvironment, environment: mockEnvironment,
autoSessionTracking: true, autoSessionTracking: true,
ignoreErrors: [/Network Error/i, /NetworkError/i],
enableTracing: true, enableTracing: true,
tracePropagationTargets: [/^\//], tracePropagationTargets: [/^\//],
tracesSampleRate: mockSentryClientsideTracesSampleRate, tracesSampleRate: mockSentryClientsideTracesSampleRate,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册