MCPcopy Create free account
hub / github.com/apitable/apitable / initBugTracker

Function initBugTracker

packages/datasheet/src/pc/common/initializer.ts:40–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40function 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
82function initDayjs(comlink: any) {
83 let lang = getLanguage() || 'zh-cn';

Callers 1

initializerFunction · 0.85

Calls 4

getEnvVariablesFunction · 0.90
getInitializationDataFunction · 0.90
getReleaseVersionFunction · 0.90
initMethod · 0.65

Tested by

no test coverage detected