()
| 38 | } |
| 39 | |
| 40 | function initBugTracker() { |
| 41 | const dsn = getEnvVariables().SENTRY_DSN; |
| 42 | // Reporting is not enabled for local development and private deployments |
| 43 | if (!dsn) { |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | Sentry.init({ |
| 48 | enabled: true, |
| 49 | dsn, |
| 50 | integrations: [ |
| 51 | new Integrations.BrowserTracing()!, |
| 52 | new RewriteFrames()!, |
| 53 | /** |
| 54 | * @description Sentry's handling of requestAnimationFrame in Chrome 74 can be problematic and lead to unexpected errors |
| 55 | * Currently rewriting the check for requestAnimationFrame based on the method provided in Sentry's issue |
| 56 | * @issue https://github.com/getsentry/sentry-javascript/issues/3388 |
| 57 | * @type {boolean} |
| 58 | */ |
| 59 | // new Sentry.Integrations.TryCatch({ |
| 60 | // requestAnimationFrame: false, |
| 61 | // }) |
| 62 | ], |
| 63 | environment: getInitializationData().env, |
| 64 | release: getReleaseVersion(), |
| 65 | normalizeDepth: 5, |
| 66 | // We recommend adjusting this value in production, or using tracesSampler |
| 67 | // for finer control |
| 68 | tracesSampleRate: 0.1, |
| 69 | maxBreadcrumbs: 10, |
| 70 | /** Every time a page is entered, a pageload or a route change is made, a record is automatically sent to the sentry, |
| 71 | * which doesn't make much sense at the moment, so turn it off and watch it later. |
| 72 | */ |
| 73 | autoSessionTracking: false, |
| 74 | ignoreErrors: [ |
| 75 | // It was found that all hovers where tooltip appears send a request to sentry and the exception status is this |
| 76 | 'ResizeObserver loop limit exceeded', |
| 77 | 'JSON Parse error: Unexpected EOF', |
| 78 | ], |
| 79 | }); |
| 80 | } |
| 81 | |
| 82 | function initDayjs(comlink: any) { |
| 83 | let lang = getLanguage() || 'zh-cn'; |
no test coverage detected