@servicetitan/datadog-rum 40.2.1 → 40.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-impl.d.ts.map +1 -1
- package/dist/create-impl.js +3 -0
- package/dist/create-impl.js.map +1 -1
- package/dist/datadog-provider.d.ts +3 -1
- package/dist/datadog-provider.d.ts.map +1 -1
- package/dist/datadog-provider.js +3 -1
- package/dist/datadog-provider.js.map +1 -1
- package/dist/get-env.d.ts +7 -0
- package/dist/get-env.d.ts.map +1 -0
- package/dist/get-env.js +26 -0
- package/dist/get-env.js.map +1 -0
- package/dist/hash-routing.d.ts +5 -1
- package/dist/hash-routing.d.ts.map +1 -1
- package/dist/hash-routing.js +23 -8
- package/dist/hash-routing.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/sanitize-view-name.d.ts.map +1 -1
- package/dist/sanitize-view-name.js +10 -0
- package/dist/sanitize-view-name.js.map +1 -1
- package/dist/shared-impl.d.ts +1 -1
- package/dist/shared-impl.d.ts.map +1 -1
- package/dist/shared-impl.js.map +1 -1
- package/dist/types.d.ts +1 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +8 -3
- package/src/create-impl.ts +2 -0
- package/src/datadog-provider.tsx +7 -3
- package/src/get-env.ts +27 -0
- package/src/hash-routing.tsx +28 -9
- package/src/index.ts +1 -0
- package/src/sanitize-view-name.tsx +17 -0
- package/src/shared-impl.ts +1 -1
- package/src/types.ts +6 -2
- package/src/__mocks__/before-send-data.ts +0 -538
- package/src/__mocks__/index.ts +0 -7
- package/src/__mocks__/init-config.ts +0 -6
- package/src/__mocks__/mfe-host.ts +0 -7
- package/src/__mocks__/process-event.ts +0 -20
- package/src/__mocks__/reset-shared-impl.ts +0 -8
- package/src/__mocks__/tracing-urls.ts +0 -30
- package/src/__mocks__/types.ts +0 -1
- package/src/__tests__/before-send.test.ts +0 -76
- package/src/__tests__/build-allowed-tracing-urls.test.ts +0 -120
- package/src/__tests__/build-before-send.test.ts +0 -193
- package/src/__tests__/create-impl.test.ts +0 -427
- package/src/__tests__/datadog-provider.test.tsx +0 -145
- package/src/__tests__/dd-rum-guard.test.ts +0 -73
- package/src/__tests__/element-service-recorder.test.ts +0 -127
- package/src/__tests__/enrich-event.test.ts +0 -139
- package/src/__tests__/get-shared.test.ts +0 -56
- package/src/__tests__/handle-resource.test.ts +0 -76
- package/src/__tests__/hash-routing.test.tsx +0 -70
- package/src/__tests__/init.test.ts +0 -69
- package/src/__tests__/integration.test.ts +0 -147
- package/src/__tests__/resolve-path-service.test.ts +0 -130
- package/src/__tests__/sanitize-view-name.test.tsx +0 -92
- package/src/__tests__/set-user.test.ts +0 -61
- package/src/__tests__/use-rum-service.test.tsx +0 -82
- package/src/runtime-override/__tests__/dev-console.test.ts +0 -158
- package/src/runtime-override/__tests__/override.test.ts +0 -109
|
@@ -1,538 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/naming-convention -- RUM event fields are snake_case */
|
|
2
|
-
// These are real error messages that are used to verify service and version attribution.
|
|
3
|
-
|
|
4
|
-
import { RumEvent, RumEventDomainContext } from '@datadog/browser-rum';
|
|
5
|
-
|
|
6
|
-
const hostErrorAxiosError400 = {
|
|
7
|
-
error: {
|
|
8
|
-
message: 'Request failed with status code 400',
|
|
9
|
-
stack: `
|
|
10
|
-
AxiosError: Request failed with status code 400
|
|
11
|
-
at settle @ https://go.servicetitan.com/scripts/build/desktop/log.55e5bb93faab978eaf35.bundle.js?3d68802447462b52b684:2:102209
|
|
12
|
-
at XMLHttpRequest.onloadend @ https://go.servicetitan.com/scripts/build/desktop/log.55e5bb93faab978eaf35.bundle.js?3d68802447462b52b684:2:71196
|
|
13
|
-
`,
|
|
14
|
-
},
|
|
15
|
-
context: {},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const hostErrorFailedToFetchMetadata = {
|
|
19
|
-
error: {
|
|
20
|
-
message:
|
|
21
|
-
'Failed to fetch: "https://unpkg.servicetitan.com/@servicetitan/global-search-bar/dist/metadata.json".',
|
|
22
|
-
},
|
|
23
|
-
context: {
|
|
24
|
-
handlingStack: `
|
|
25
|
-
Error:
|
|
26
|
-
at Li @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17756142
|
|
27
|
-
at Qi.ye.componentDidCatch.de.callback @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17756694
|
|
28
|
-
at sh @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17742258
|
|
29
|
-
at kk @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17791244
|
|
30
|
-
at ik @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17790779
|
|
31
|
-
at hk @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17790255
|
|
32
|
-
at Wk @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17801154
|
|
33
|
-
at Pk @ https://go.servicetitan.com/scripts/build/desktop/main.f692da9da087afdc5a8e.bundle.js?5813f5881d1fcbafd9db:2:17800452
|
|
34
|
-
`,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const mfeErrorComponentDidCatch = {
|
|
39
|
-
error: {
|
|
40
|
-
message: `
|
|
41
|
-
Request failed with status code 502
|
|
42
|
-
URL: https://coolairmechanicalllc-71757.eh.go.servicetitan.com/api/global-search/search
|
|
43
|
-
`,
|
|
44
|
-
},
|
|
45
|
-
context: {
|
|
46
|
-
handlingStack: `
|
|
47
|
-
Error:
|
|
48
|
-
at console.e [as error] @ https://edge.fullstory.com/s/fs.js:4:32090
|
|
49
|
-
at Li @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:259070
|
|
50
|
-
at Qi.f.componentDidCatch.c.callback @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:259583
|
|
51
|
-
at sh @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:246367
|
|
52
|
-
at kk @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:291027
|
|
53
|
-
at ik @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:290595
|
|
54
|
-
at ik @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:290492
|
|
55
|
-
at ik @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.5f317fc/dist/bundle/light/common.4930800d528fa1ae167c.bundle.js:2:290492
|
|
56
|
-
`,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const hostResourceXhrRequest = {
|
|
61
|
-
resource: {
|
|
62
|
-
url: 'https://go.servicetitan.com/CoreSettings/GetPermissions?_=1757708219745',
|
|
63
|
-
},
|
|
64
|
-
context: {
|
|
65
|
-
handlingStack: `
|
|
66
|
-
Error:
|
|
67
|
-
at Object.send @ https://go.servicetitan.com/scripts/build/desktop-legacy/core.a7e0b207b2ca2251a254.bundle.js:2:214394
|
|
68
|
-
at ajax @ https://go.servicetitan.com/scripts/build/desktop-legacy/core.a7e0b207b2ca2251a254.bundle.js:2:206941
|
|
69
|
-
at jQuery.aroundAjax [as ajax] @ https://go.servicetitan.com/scripts/build/desktop-legacy/app.730fca0be346d7ecd92e.bundle.js:2:4543920
|
|
70
|
-
at jQuery.each.jQuery.<computed> [as get] @ https://go.servicetitan.com/scripts/build/desktop-legacy/core.a7e0b207b2ca2251a254.bundle.js:2:208902
|
|
71
|
-
at activateSettingsBoard @ https://go.servicetitan.com/scripts/build/desktop-legacy/app.730fca0be346d7ecd92e.bundle.js:2:8233677
|
|
72
|
-
at context_prototype.<anonymous> @ https://go.servicetitan.com/scripts/build/desktop-legacy/app.730fca0be346d7ecd92e.bundle.js:2:8242958
|
|
73
|
-
at nextRoute @ https://go.servicetitan.com/scripts/build/desktop-legacy/core.a7e0b207b2ca2251a254.bundle.js:2:587350
|
|
74
|
-
at wrapped_route @ https://go.servicetitan.com/scripts/build/desktop-legacy/core.a7e0b207b2ca2251a254.bundle.js:2:587499
|
|
75
|
-
`,
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const hostResourceUnpkgRequest = {
|
|
80
|
-
resource: {
|
|
81
|
-
url: 'https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/main.a7d8d964f5d244d802a4.bundle.js',
|
|
82
|
-
},
|
|
83
|
-
context: {},
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const hostResourceUnpkgRequestHyphenatedPrerelease = {
|
|
87
|
-
resource: {
|
|
88
|
-
url: 'https://unpkg.servicetitan.com/@servicetitan/eh-my-tenants@5.0.1-master-rc-eb9d8e988.0/dist/bundle/full/runtime.42087bf59c5e718ff526.bundle.js',
|
|
89
|
-
},
|
|
90
|
-
context: {},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const hostResourceUnpkgRequestBranchAndHash = {
|
|
94
|
-
resource: {
|
|
95
|
-
url: 'https://unpkg.servicetitan.com/@servicetitan/eh-ccpro@1.7.2-master-48be403.0/dist/bundle/full/runtime.e648f9a4.bundle.js',
|
|
96
|
-
},
|
|
97
|
-
context: {},
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const hostResourceUnpkgRequestBuildAndBranch = {
|
|
101
|
-
resource: {
|
|
102
|
-
url: 'https://unpkg.servicetitan.com/@servicetitan/pricebook-enterprisehub@0.0.0-1.0.532-master/dist/bundle/full/runtime.2df2b4c6001e8a11f406.bundle.js',
|
|
103
|
-
},
|
|
104
|
-
context: {},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const hostResourceUnpkgRequestGitDescribe = {
|
|
108
|
-
resource: {
|
|
109
|
-
url: 'https://unpkg.servicetitan.com/@servicetitan/customer-portal-estimates@0.0.0-1.0.1773-mockSupportForCPContainers.g19c652d3a4/dist/bundle/full/runtime.c58942f1a38b681d0249.bundle.js',
|
|
110
|
-
},
|
|
111
|
-
context: {},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const mfeErrorHyphenatedPrerelease = {
|
|
115
|
-
error: {
|
|
116
|
-
message: 'Role name already exists',
|
|
117
|
-
stack: `
|
|
118
|
-
Error: Role name already exists
|
|
119
|
-
at value @ https://unpkg.servicetitan.com/@servicetitan/eh-user-management-client@10.0.9-master-rc-eb9d8e988.0/dist/bundle/full/main.0bbcdbd062f391fda175.bundle.js:2:1368334
|
|
120
|
-
`,
|
|
121
|
-
},
|
|
122
|
-
context: {},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const mfeResourceXhrRequest = {
|
|
126
|
-
resource: { url: 'https://go.servicetitan.com/app/api/data/user' },
|
|
127
|
-
context: {
|
|
128
|
-
handlingStack: `
|
|
129
|
-
Error:
|
|
130
|
-
at dispatchXhrRequest @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:157541
|
|
131
|
-
at new Promise @ <anonymous>
|
|
132
|
-
at xhr @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:153971
|
|
133
|
-
at Axios.dispatchRequest @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:166313
|
|
134
|
-
at Axios._request @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:171799
|
|
135
|
-
at Axios.request @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:168810
|
|
136
|
-
at wrap [as request] @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/common.5bf0a9999ba3a2165cca.bundle.js:2:118354
|
|
137
|
-
at UserApi.get @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/main.a7d8d964f5d244d802a4.bundle.js:2:582407
|
|
138
|
-
`,
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const renderErrorStack = `
|
|
143
|
-
TypeError: null is not an object (evaluating 'le.current.useState')
|
|
144
|
-
at <anonymous> @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:294096
|
|
145
|
-
at PortalProvider @ https://go.servicetitan.com/scripts/build/desktop/shared/servicetitan.6c43a628f29ef9f51511.bundle.js:2:1137664
|
|
146
|
-
at Nh @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:217660
|
|
147
|
-
at Po @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:273405
|
|
148
|
-
at Uk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:269025
|
|
149
|
-
at Tk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:268953
|
|
150
|
-
at Ik @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:268806
|
|
151
|
-
at Nk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:265121
|
|
152
|
-
at Gk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:264074
|
|
153
|
-
at J @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor.8d7a7328d8d1c168f888.bundle.js:2:122247
|
|
154
|
-
at R @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor.8d7a7328d8d1c168f888.bundle.js:2:122611
|
|
155
|
-
at run @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5670964
|
|
156
|
-
at runIfPresent @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5671192
|
|
157
|
-
at onGlobalMessage @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5671715
|
|
158
|
-
`;
|
|
159
|
-
|
|
160
|
-
const hostErrorRenderUnhandled = {
|
|
161
|
-
error: {
|
|
162
|
-
message: "null is not an object (evaluating 'le.current.useState')",
|
|
163
|
-
stack: renderErrorStack,
|
|
164
|
-
},
|
|
165
|
-
context: {},
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
const hostErrorRenderConsole = {
|
|
169
|
-
error: {
|
|
170
|
-
message: "TypeError: null is not an object (evaluating 'le.current.useState')",
|
|
171
|
-
stack: renderErrorStack,
|
|
172
|
-
},
|
|
173
|
-
context: {
|
|
174
|
-
handlingStack: `
|
|
175
|
-
HandlingStack: console error
|
|
176
|
-
at e @ https://edge.fullstory.com/s/fs.js:2:34743
|
|
177
|
-
at <anonymous> @ https://unpkg.servicetitan.com/@servicetitan/ti-assist@0.0.0-master.626f98a/dist/bundle/light/vendor.78723d74cfa02e68895a.bundle.js:2:200079
|
|
178
|
-
at Li @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:228973
|
|
179
|
-
at <anonymous> @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:229190
|
|
180
|
-
at sh @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:216201
|
|
181
|
-
at kk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:261182
|
|
182
|
-
at ik @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:260585
|
|
183
|
-
at hk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:260117
|
|
184
|
-
at Wk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:270178
|
|
185
|
-
at Pk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:269520
|
|
186
|
-
at Gk @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js:2:264384
|
|
187
|
-
at J @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor.8d7a7328d8d1c168f888.bundle.js:2:122247
|
|
188
|
-
at R @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor.8d7a7328d8d1c168f888.bundle.js:2:122611
|
|
189
|
-
at run @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5670964
|
|
190
|
-
at runIfPresent @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5671192
|
|
191
|
-
at onGlobalMessage @ https://go.servicetitan.com/scripts/build/desktop/vendor.15b48c67111ee07c5b30.bundle.js:2:5671715
|
|
192
|
-
`,
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
const mfeErrorAxiosError401 = {
|
|
197
|
-
error: {
|
|
198
|
-
message: 'AxiosError: Request failed with status code 401',
|
|
199
|
-
stack: `
|
|
200
|
-
AxiosError: Request failed with status code 401
|
|
201
|
-
at settle @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/common.5178678e6dfc4f632bdb.bundle.js:2:31361
|
|
202
|
-
at XMLHttpRequest.onloadend @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/common.5178678e6dfc4f632bdb.bundle.js:2:40154
|
|
203
|
-
at Axios.request @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/common.5178678e6dfc4f632bdb.bundle.js:2:55248
|
|
204
|
-
at async makeCodedException @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/servicetitan.f1fe089245e6be8be424.bundle.js:2:76067
|
|
205
|
-
at async Object.queryFn @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/main.64019af64e0ecf97d613.bundle.js:2:579977
|
|
206
|
-
`,
|
|
207
|
-
},
|
|
208
|
-
context: {
|
|
209
|
-
handlingStack: `
|
|
210
|
-
HandlingStack: console error
|
|
211
|
-
at console.e @ https://edge.fullstory.com/s/fs.js:2:34738
|
|
212
|
-
at pe.e.<computed> [as error] @ https://unpkg.servicetitan.com/@servicetitan/ti-assist@0.0.0-master.4f470d3/dist/bundle/light/vendor.61a280ed9f0a0810f96c.bundle.js:2:381984
|
|
213
|
-
at <anonymous> @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/servicetitan.f1fe089245e6be8be424.bundle.js:2:792340
|
|
214
|
-
at executeAction @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.8048a9efb0bf24bfbf33.bundle.js:2:89974
|
|
215
|
-
at setQueryState @ https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.8048a9efb0bf24bfbf33.bundle.js:2:89747
|
|
216
|
-
at <anonymous> @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/main.64019af64e0ecf97d613.bundle.js:2:1032854
|
|
217
|
-
at Set.forEach @ <anonymous>
|
|
218
|
-
at <anonymous> @ https://unpkg.servicetitan.com/@servicetitan/dispatch-pro-console@0.0.0-master.8e05d88/dist/bundle/light/main.64019af64e0ecf97d613.bundle.js:2:1032835
|
|
219
|
-
`,
|
|
220
|
-
},
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const hostErrorStringNoStack = {
|
|
224
|
-
error: {
|
|
225
|
-
message: '[Post loadGuide request failed: Unable to find global css after delay]',
|
|
226
|
-
},
|
|
227
|
-
context: {
|
|
228
|
-
handlingStack: `
|
|
229
|
-
HandlingStack: console error
|
|
230
|
-
at console.e @ https://edge.fullstory.com/s/fs.js:2:34738
|
|
231
|
-
at pe.e.<computed> [as error] @ https://unpkg.servicetitan.com/@servicetitan/ti-assist@0.0.0-master.4f470d3/dist/bundle/light/vendor.61a280ed9f0a0810f96c.bundle.js:2:381984
|
|
232
|
-
at Q0 @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:400978
|
|
233
|
-
at write @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:449241
|
|
234
|
-
at Ke @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:19797
|
|
235
|
-
at s @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:19998
|
|
236
|
-
at dispatch @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:79967
|
|
237
|
-
at Ke @ https://cdn.pendo.io/agent/static/0359ffe9-310c-40b2-6e51-9ad6adde51e0/pendo.js:10:19797
|
|
238
|
-
`,
|
|
239
|
-
},
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
const mfeHandlingStack = `
|
|
243
|
-
Error:
|
|
244
|
-
at addAction @ https://unpkg.servicetitan.com/@servicetitan/task-hub@1.4.0/dist/bundle/light/main.2a1f0c9d8e7b6a5f4e3d.bundle.js:2:10432
|
|
245
|
-
at onClick @ https://unpkg.servicetitan.com/@servicetitan/task-hub@1.4.0/dist/bundle/light/main.2a1f0c9d8e7b6a5f4e3d.bundle.js:2:88120
|
|
246
|
-
`;
|
|
247
|
-
|
|
248
|
-
const mfeManualView = {
|
|
249
|
-
view: { name: '/task-hub/{id}' },
|
|
250
|
-
context: { handlingStack: mfeHandlingStack },
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
/*
|
|
254
|
-
* A long animation frame that ran a short host script and a longer MFE script. The MFE script
|
|
255
|
-
* is listed second, so `scripts[0]` would name the host.
|
|
256
|
-
*/
|
|
257
|
-
const mfeLongAnimationFrame = {
|
|
258
|
-
long_task: {
|
|
259
|
-
entry_type: 'long-animation-frame' as const,
|
|
260
|
-
duration: 180,
|
|
261
|
-
scripts: [
|
|
262
|
-
{
|
|
263
|
-
duration: 12,
|
|
264
|
-
source_url:
|
|
265
|
-
'https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js',
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
duration: 140,
|
|
269
|
-
source_url:
|
|
270
|
-
'https://unpkg.servicetitan.com/@servicetitan/task-hub@1.4.0/dist/bundle/light/main.2a1f0c9d8e7b6a5f4e3d.bundle.js',
|
|
271
|
-
},
|
|
272
|
-
],
|
|
273
|
-
},
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
const hostLongAnimationFrame = {
|
|
277
|
-
long_task: {
|
|
278
|
-
entry_type: 'long-animation-frame' as const,
|
|
279
|
-
duration: 120,
|
|
280
|
-
scripts: [
|
|
281
|
-
{
|
|
282
|
-
duration: 10,
|
|
283
|
-
source_url:
|
|
284
|
-
'https://unpkg.servicetitan.com/@servicetitan/task-hub@1.4.0/dist/bundle/light/main.2a1f0c9d8e7b6a5f4e3d.bundle.js',
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
duration: 95,
|
|
288
|
-
source_url:
|
|
289
|
-
'https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js',
|
|
290
|
-
},
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
const mfeLongAnimationFrameWithoutDurations = {
|
|
296
|
-
long_task: {
|
|
297
|
-
entry_type: 'long-animation-frame' as const,
|
|
298
|
-
duration: 60,
|
|
299
|
-
scripts: [
|
|
300
|
-
{
|
|
301
|
-
source_url:
|
|
302
|
-
'https://unpkg.servicetitan.com/@servicetitan/task-hub@1.4.0/dist/bundle/light/main.2a1f0c9d8e7b6a5f4e3d.bundle.js',
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
source_url:
|
|
306
|
-
'https://go.servicetitan.com/scripts/build/desktop/shared/vendor-core.bb011922ab999eb4885e.bundle.js',
|
|
307
|
-
},
|
|
308
|
-
],
|
|
309
|
-
},
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
const longAnimationFrameWithoutScripts = {
|
|
313
|
-
long_task: { entry_type: 'long-animation-frame' as const, duration: 60 },
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
const legacyLongTask = {
|
|
317
|
-
long_task: { entry_type: 'long-task' as const, duration: 80 },
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
const mfeActionCustom = {
|
|
321
|
-
context: {
|
|
322
|
-
handlingStack: `
|
|
323
|
-
Error:
|
|
324
|
-
at addAction @ https://unpkg.servicetitan.com/@servicetitan/global-search-bar@0.0.0-HEAD.c8fa2a6/dist/bundle/light/main.a7d8d964f5d244d802a4.bundle.js:2:582407
|
|
325
|
-
`,
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
type DeepPartial<T> = T extends object
|
|
330
|
-
? {
|
|
331
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
332
|
-
}
|
|
333
|
-
: T;
|
|
334
|
-
|
|
335
|
-
export type RumEventType = DeepPartial<RumEvent>;
|
|
336
|
-
|
|
337
|
-
export const rumEvents: {
|
|
338
|
-
event: RumEventType;
|
|
339
|
-
context?: RumEventDomainContext;
|
|
340
|
-
title: string;
|
|
341
|
-
service?: string;
|
|
342
|
-
version?: string;
|
|
343
|
-
}[] = [
|
|
344
|
-
{
|
|
345
|
-
event: {
|
|
346
|
-
type: 'error',
|
|
347
|
-
error: hostErrorAxiosError400.error,
|
|
348
|
-
},
|
|
349
|
-
context: hostErrorAxiosError400.context,
|
|
350
|
-
title: 'host request failed with status code 400',
|
|
351
|
-
service: undefined,
|
|
352
|
-
version: undefined,
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
event: {
|
|
356
|
-
type: 'error',
|
|
357
|
-
error: hostErrorFailedToFetchMetadata.error,
|
|
358
|
-
},
|
|
359
|
-
context: hostErrorFailedToFetchMetadata.context,
|
|
360
|
-
title: 'host failed to fetch metadata.json',
|
|
361
|
-
service: 'global-search-bar',
|
|
362
|
-
version: 'unknown',
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
event: {
|
|
366
|
-
type: 'error',
|
|
367
|
-
error: mfeErrorComponentDidCatch.error,
|
|
368
|
-
},
|
|
369
|
-
context: mfeErrorComponentDidCatch.context,
|
|
370
|
-
title: 'MFE request failed with status code 502',
|
|
371
|
-
service: 'global-search-bar',
|
|
372
|
-
version: '0.0.0-HEAD.5f317fc',
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
event: {
|
|
376
|
-
type: 'resource',
|
|
377
|
-
resource: hostResourceXhrRequest.resource,
|
|
378
|
-
},
|
|
379
|
-
context: hostResourceXhrRequest.context,
|
|
380
|
-
title: 'host sends XHR request',
|
|
381
|
-
service: undefined,
|
|
382
|
-
version: undefined,
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
event: {
|
|
386
|
-
type: 'resource',
|
|
387
|
-
resource: hostResourceUnpkgRequest.resource,
|
|
388
|
-
},
|
|
389
|
-
context: hostResourceUnpkgRequest.context,
|
|
390
|
-
title: 'host sends request to unpkg',
|
|
391
|
-
service: 'global-search-bar',
|
|
392
|
-
version: '0.0.0-HEAD.c8fa2a6',
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
event: {
|
|
396
|
-
type: 'resource',
|
|
397
|
-
resource: mfeResourceXhrRequest.resource,
|
|
398
|
-
},
|
|
399
|
-
context: mfeResourceXhrRequest.context,
|
|
400
|
-
title: 'mfe sends XHR request',
|
|
401
|
-
service: 'global-search-bar',
|
|
402
|
-
version: '0.0.0-HEAD.c8fa2a6',
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
event: {
|
|
406
|
-
type: 'resource',
|
|
407
|
-
resource: hostResourceUnpkgRequestHyphenatedPrerelease.resource,
|
|
408
|
-
},
|
|
409
|
-
context: hostResourceUnpkgRequestHyphenatedPrerelease.context,
|
|
410
|
-
title: 'host sends request to unpkg for a prerelease with a hyphen',
|
|
411
|
-
service: 'eh-my-tenants',
|
|
412
|
-
version: '5.0.1-master-rc-eb9d8e988.0',
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
event: {
|
|
416
|
-
type: 'resource',
|
|
417
|
-
resource: hostResourceUnpkgRequestBranchAndHash.resource,
|
|
418
|
-
},
|
|
419
|
-
context: hostResourceUnpkgRequestBranchAndHash.context,
|
|
420
|
-
title: 'host sends request to unpkg for a prerelease with a branch and a hash',
|
|
421
|
-
service: 'eh-ccpro',
|
|
422
|
-
version: '1.7.2-master-48be403.0',
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
event: {
|
|
426
|
-
type: 'resource',
|
|
427
|
-
resource: hostResourceUnpkgRequestBuildAndBranch.resource,
|
|
428
|
-
},
|
|
429
|
-
context: hostResourceUnpkgRequestBuildAndBranch.context,
|
|
430
|
-
title: 'host sends request to unpkg for a prerelease with a build number and a branch',
|
|
431
|
-
service: 'pricebook-enterprisehub',
|
|
432
|
-
version: '0.0.0-1.0.532-master',
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
event: {
|
|
436
|
-
type: 'resource',
|
|
437
|
-
resource: hostResourceUnpkgRequestGitDescribe.resource,
|
|
438
|
-
},
|
|
439
|
-
context: hostResourceUnpkgRequestGitDescribe.context,
|
|
440
|
-
title: 'host sends request to unpkg for a prerelease with a git describe suffix',
|
|
441
|
-
service: 'customer-portal-estimates',
|
|
442
|
-
version: '0.0.0-1.0.1773-mockSupportForCPContainers.g19c652d3a4',
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
event: {
|
|
446
|
-
type: 'error',
|
|
447
|
-
error: mfeErrorHyphenatedPrerelease.error,
|
|
448
|
-
},
|
|
449
|
-
context: mfeErrorHyphenatedPrerelease.context,
|
|
450
|
-
title: 'MFE error from a prerelease with a hyphen',
|
|
451
|
-
service: 'eh-user-management-client',
|
|
452
|
-
version: '10.0.9-master-rc-eb9d8e988.0',
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
event: {
|
|
456
|
-
type: 'error',
|
|
457
|
-
error: hostErrorRenderUnhandled.error,
|
|
458
|
-
},
|
|
459
|
-
context: hostErrorRenderUnhandled.context,
|
|
460
|
-
title: 'host render error is unhandled',
|
|
461
|
-
service: undefined,
|
|
462
|
-
version: undefined,
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
event: {
|
|
466
|
-
type: 'error',
|
|
467
|
-
error: hostErrorRenderConsole.error,
|
|
468
|
-
},
|
|
469
|
-
context: hostErrorRenderConsole.context,
|
|
470
|
-
title: 'host render error is logged through the ti-assist console wrapper',
|
|
471
|
-
service: undefined,
|
|
472
|
-
version: undefined,
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
event: {
|
|
476
|
-
type: 'error',
|
|
477
|
-
error: mfeErrorAxiosError401.error,
|
|
478
|
-
},
|
|
479
|
-
context: mfeErrorAxiosError401.context,
|
|
480
|
-
title: 'MFE request failed with status code 401 logged through the ti-assist console wrapper',
|
|
481
|
-
service: 'dispatch-pro-console',
|
|
482
|
-
version: '0.0.0-master.8e05d88',
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
event: {
|
|
486
|
-
type: 'error',
|
|
487
|
-
error: hostErrorStringNoStack.error,
|
|
488
|
-
},
|
|
489
|
-
context: hostErrorStringNoStack.context,
|
|
490
|
-
title: 'host logs a string with no error stack through the ti-assist console wrapper',
|
|
491
|
-
service: 'ti-assist',
|
|
492
|
-
version: '0.0.0-master.4f470d3',
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
event: { type: 'action' },
|
|
496
|
-
context: mfeActionCustom.context,
|
|
497
|
-
title: 'MFE adds a custom action',
|
|
498
|
-
service: 'global-search-bar',
|
|
499
|
-
version: '0.0.0-HEAD.c8fa2a6',
|
|
500
|
-
},
|
|
501
|
-
{
|
|
502
|
-
event: { type: 'view', view: mfeManualView.view },
|
|
503
|
-
context: mfeManualView.context,
|
|
504
|
-
title: 'MFE starts a manual view',
|
|
505
|
-
service: 'task-hub',
|
|
506
|
-
version: '1.4.0',
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
event: { type: 'long_task', long_task: mfeLongAnimationFrame.long_task },
|
|
510
|
-
title: 'long animation frame whose longest script is the MFE',
|
|
511
|
-
service: 'task-hub',
|
|
512
|
-
version: '1.4.0',
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
event: { type: 'long_task', long_task: hostLongAnimationFrame.long_task },
|
|
516
|
-
title: 'long animation frame whose longest script is the host',
|
|
517
|
-
service: undefined,
|
|
518
|
-
version: undefined,
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
event: { type: 'long_task', long_task: legacyLongTask.long_task },
|
|
522
|
-
title: 'legacy long task',
|
|
523
|
-
service: undefined,
|
|
524
|
-
version: undefined,
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
event: { type: 'long_task', long_task: mfeLongAnimationFrameWithoutDurations.long_task },
|
|
528
|
-
title: 'long animation frame whose scripts have no duration',
|
|
529
|
-
service: 'task-hub',
|
|
530
|
-
version: '1.4.0',
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
event: { type: 'long_task', long_task: longAnimationFrameWithoutScripts.long_task },
|
|
534
|
-
title: 'long animation frame with no scripts',
|
|
535
|
-
service: undefined,
|
|
536
|
-
version: undefined,
|
|
537
|
-
},
|
|
538
|
-
];
|
package/src/__mocks__/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const mfeHost = (name: string, version: string): HTMLElement => {
|
|
2
|
-
const element = document.createElement(`${name}-abc123`);
|
|
3
|
-
element.setAttribute('data-mfe-name', name);
|
|
4
|
-
element.setAttribute('data-mfe-version', version);
|
|
5
|
-
element.attachShadow({ mode: 'open' });
|
|
6
|
-
return element;
|
|
7
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { RumEvent, RumEventDomainContext } from '@datadog/browser-rum';
|
|
2
|
-
import { datadogRum } from '@datadog/browser-rum';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Invokes the `beforeSend` captured on the most recent `datadogRum.init` call
|
|
6
|
-
* with the given event partial. Returns whatever `beforeSend` returns (false
|
|
7
|
-
* drops, true/void proceeds). The helper mutates `event` in place, so callers
|
|
8
|
-
* that need to inspect mutations should hold a reference to the event they
|
|
9
|
-
* pass in.
|
|
10
|
-
*/
|
|
11
|
-
export const processEvent = (
|
|
12
|
-
event: Partial<RumEvent>,
|
|
13
|
-
context: RumEventDomainContext = {}
|
|
14
|
-
): boolean | void => {
|
|
15
|
-
const beforeSend = jest.mocked(datadogRum.init).mock.calls.at(-1)?.[0].beforeSend as (
|
|
16
|
-
e: RumEvent,
|
|
17
|
-
c: RumEventDomainContext
|
|
18
|
-
) => boolean | void;
|
|
19
|
-
return beforeSend(event as RumEvent, context);
|
|
20
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { bundleState } from '../bundle-state';
|
|
2
|
-
import { STATE_KEY, type GlobalSlot } from '../get-shared';
|
|
3
|
-
|
|
4
|
-
export function resetSharedImpl(): void {
|
|
5
|
-
const slot = globalThis as unknown as GlobalSlot;
|
|
6
|
-
delete slot[STATE_KEY];
|
|
7
|
-
bundleState.isSdkInitializer = false;
|
|
8
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { PropagatorType, RumInitConfiguration } from '@datadog/browser-rum';
|
|
2
|
-
import { datadogRum } from '@datadog/browser-rum';
|
|
3
|
-
|
|
4
|
-
export type { PropagatorType };
|
|
5
|
-
|
|
6
|
-
interface Matcher {
|
|
7
|
-
match: (url: string) => boolean;
|
|
8
|
-
propagatorTypes?: PropagatorType[] | null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function isAllowedTracingUrl(
|
|
12
|
-
matchers: NonNullable<RumInitConfiguration['allowedTracingUrls']>,
|
|
13
|
-
url: string,
|
|
14
|
-
propagator: PropagatorType = 'tracecontext'
|
|
15
|
-
): boolean {
|
|
16
|
-
const matcher = matchers.find(
|
|
17
|
-
(candidate): candidate is Matcher =>
|
|
18
|
-
typeof candidate === 'object' &&
|
|
19
|
-
'propagatorTypes' in candidate &&
|
|
20
|
-
!!candidate.propagatorTypes?.includes(propagator)
|
|
21
|
-
);
|
|
22
|
-
return matcher?.match(url) ?? false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function getInitAllowedTracingUrls(): NonNullable<
|
|
26
|
-
RumInitConfiguration['allowedTracingUrls']
|
|
27
|
-
> {
|
|
28
|
-
const call = jest.mocked(datadogRum.init).mock.calls.at(-1)![0];
|
|
29
|
-
return call.allowedTracingUrls!;
|
|
30
|
-
}
|
package/src/__mocks__/types.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Mutable<T> = { -readonly [P in keyof T]: T[P] };
|