-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy patherror.ts
111 lines (109 loc) · 3.64 KB
/
error.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import type { Event } from '@sentry/core';
export function Error(obj?: Event): any {
const timestamp = Date.now() / 1000;
return {
exception: {
values: [
{
type: 'Error',
value: 'testing error',
stacktrace: {
frames: [
{
filename: 'webpack-internal:///../../getsentry/static/getsentry/gsApp/components/replayInit.tsx',
function: 'eval',
in_app: true,
lineno: 64,
colno: 13,
},
],
},
mechanism: {
type: 'instrument',
handled: true,
data: {
function: 'setTimeout',
},
},
},
],
},
level: 'error',
event_id: 'event_id',
platform: 'javascript',
timestamp,
environment: 'prod',
release: 'frontend@22.11.0',
sdk: {
// {{{
integrations: [
'InboundFilters',
'FunctionToString',
'BrowserApiErrors',
'Breadcrumbs',
'GlobalHandlers',
'LinkedErrors',
'Dedupe',
'HttpContext',
'ExtraErrorData',
'BrowserTracing',
],
name: 'sentry.javascript.react',
version: '7.18.0',
packages: [
{
name: 'npm:@sentry/react',
version: '7.18.0',
},
],
}, // }}}
tags: {
// {{{
organization: '1',
'organization.slug': 'sentry-emerging-tech',
plan: 'am1_business_ent_auf',
'plan.name': 'Business',
'plan.max_members': 'null',
'plan.total_members': '15',
'plan.tier': 'am1',
'timeOrigin.mode': 'navigationStart',
}, // }}}
user: {
ip_address: '0.0.0.0',
email: 'billy@sentry.io',
id: '1',
name: 'Billy Vong',
},
contexts: {
organization: {
id: '1',
slug: 'sentry-emerging-tech',
},
Error: {},
},
breadcrumbs: [
{
timestamp,
category: 'console',
data: {
arguments: [
'Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s',
'Router, RouterContext',
],
logger: 'console',
},
message:
'Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s Router, RouterContext',
},
],
sdkProcessingMetadata: {},
request: {
url: 'https://example.org',
headers: {
'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36',
},
},
...obj,
};
}