@konnectio/core 4.0.66 → 4.0.68
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/{ActionField-BFyj_Q6Y.js → ActionField-_CEmKSlf.js} +15 -15
- package/dist/ActionField-_CEmKSlf.js.br +0 -0
- package/dist/{AvailabilitySkeleton-CErmWvze.js → AvailabilitySkeleton-CHDZOB_s.js} +67 -70
- package/dist/AvailabilitySkeleton-CHDZOB_s.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-DjFIhQhI.js +8725 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-DjFIhQhI.js.br +0 -0
- package/dist/{CheckoutWindow-D17Ro_DJ.js → CheckoutWindow-BzoYJ5v5.js} +5 -5
- package/dist/CheckoutWindow-BzoYJ5v5.js.br +0 -0
- package/dist/{ErrorMessage-CGQ7GBeF.js → ErrorMessage-Cc8QanBP.js} +4 -4
- package/dist/ErrorMessage-Cc8QanBP.js.br +0 -0
- package/dist/{EventAvailabilityForm-CJfzXqvA.js → EventAvailabilityForm-CdmiDieo.js} +25 -25
- package/dist/EventAvailabilityForm-CdmiDieo.js.br +0 -0
- package/dist/{Field-U4PRgzZl.js → Field-DMMbo6LE.js} +9 -9
- package/dist/Field-DMMbo6LE.js.br +0 -0
- package/dist/{Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DZub1PhF.js → Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DKrodyae.js} +3486 -3448
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DKrodyae.js.br +0 -0
- package/dist/{TermsOfService-DOeiT92a.js → TermsOfService-YxQsHH5-.js} +6 -6
- package/dist/TermsOfService-YxQsHH5-.js.br +0 -0
- package/dist/{_-D7TRIaiE.js → _-DZrN6t_6.js} +3 -3
- package/dist/_.vue_vue_type_style_index_0_lang-C4mV4F7L.js +40 -0
- package/dist/_.vue_vue_type_style_index_0_lang-C4mV4F7L.js.br +0 -0
- package/dist/_commonjsHelpers-BqFuLgLz.js +25 -0
- package/dist/_commonjsHelpers-BqFuLgLz.js.br +0 -0
- package/dist/{_sentry-release-injection-file-Yp2ihk3D.js → _sentry-release-injection-file-Bgn3HK9h.js} +3798 -3814
- package/dist/_sentry-release-injection-file-Bgn3HK9h.js.br +0 -0
- package/dist/availability.js +63 -74
- package/dist/availability.js.br +0 -0
- package/dist/deep-link.js +25 -37
- package/dist/deep-link.js.br +0 -0
- package/dist/event.js +410 -421
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.js +75 -86
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.js +250 -261
- package/dist/gift-card.js.br +0 -0
- package/dist/{giftCard-ByGCHqVm.js → giftCard-D-wdGVBh.js} +15 -15
- package/dist/giftCard-D-wdGVBh.js.br +0 -0
- package/dist/hotel.js +1014 -1017
- package/dist/hotel.js.br +0 -0
- package/dist/{masonry.plugin-B2WHiWIP.js → masonry.plugin-D3cbfEtC.js} +936 -960
- package/dist/masonry.plugin-D3cbfEtC.js.br +0 -0
- package/dist/{mitt-DZo2eOMo.js → mitt-BWKhoTz3.js} +796 -779
- package/dist/mitt-BWKhoTz3.js.br +0 -0
- package/dist/polyfill.js +4662 -13673
- package/dist/polyfill.js.br +0 -0
- package/dist/sentry-D-KvzqAy.js +1452 -0
- package/dist/sentry-D-KvzqAy.js.br +0 -0
- package/dist/{style-DCxChsQz.js → style-B8UHQIzP.js} +50 -50
- package/dist/style-B8UHQIzP.js.br +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.br +0 -0
- package/package.json +11 -11
- package/dist/ActionField-BFyj_Q6Y.js.br +0 -0
- package/dist/AvailabilitySkeleton-CErmWvze.js.br +0 -0
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dj5wPaD7.js +0 -8678
- package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-Dj5wPaD7.js.br +0 -0
- package/dist/CheckoutWindow-D17Ro_DJ.js.br +0 -0
- package/dist/ErrorMessage-CGQ7GBeF.js.br +0 -0
- package/dist/EventAvailabilityForm-CJfzXqvA.js.br +0 -0
- package/dist/Field-U4PRgzZl.js.br +0 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-DZub1PhF.js.br +0 -0
- package/dist/TermsOfService-DOeiT92a.js.br +0 -0
- package/dist/_.vue_vue_type_style_index_0_lang-DEeIjtcD.js +0 -77
- package/dist/_.vue_vue_type_style_index_0_lang-DEeIjtcD.js.br +0 -0
- package/dist/_commonjsHelpers-BfPn4qnR.js +0 -2650
- package/dist/_commonjsHelpers-BfPn4qnR.js.br +0 -0
- package/dist/_sentry-release-injection-file-Yp2ihk3D.js.br +0 -0
- package/dist/giftCard-ByGCHqVm.js.br +0 -0
- package/dist/masonry.plugin-B2WHiWIP.js.br +0 -0
- package/dist/mitt-DZo2eOMo.js.br +0 -0
- package/dist/style-DCxChsQz.js.br +0 -0
|
@@ -0,0 +1,1452 @@
|
|
|
1
|
+
import "./_sentry-release-injection-file-Bgn3HK9h.js";
|
|
2
|
+
(function() {
|
|
3
|
+
try {
|
|
4
|
+
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new Error().stack;
|
|
5
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1c63d8f7-5f71-4edd-8ae0-62d79a727e77", e._sentryDebugIdIdentifier = "sentry-dbid-1c63d8f7-5f71-4edd-8ae0-62d79a727e77");
|
|
6
|
+
} catch {
|
|
7
|
+
}
|
|
8
|
+
})();
|
|
9
|
+
{
|
|
10
|
+
var P = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
11
|
+
P._sentryModuleMetadata = P._sentryModuleMetadata || {}, P._sentryModuleMetadata[new Error().stack] = Object.assign(
|
|
12
|
+
{},
|
|
13
|
+
P._sentryModuleMetadata[new Error().stack],
|
|
14
|
+
{ "_sentryBundlerPluginAppKey:konnectio-frontend-core": !0 }
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
const $t = Object.prototype.toString;
|
|
18
|
+
function pt(e, t) {
|
|
19
|
+
return $t.call(e) === `[object ${t}]`;
|
|
20
|
+
}
|
|
21
|
+
function Dt(e) {
|
|
22
|
+
return pt(e, "String");
|
|
23
|
+
}
|
|
24
|
+
function _t(e) {
|
|
25
|
+
return pt(e, "Object");
|
|
26
|
+
}
|
|
27
|
+
function vt(e) {
|
|
28
|
+
return !!(e && e.then && typeof e.then == "function");
|
|
29
|
+
}
|
|
30
|
+
const C = "8.19.0", S = globalThis;
|
|
31
|
+
function ft(e, t, n) {
|
|
32
|
+
const s = n || S, r = s.__SENTRY__ = s.__SENTRY__ || {}, i = r[C] = r[C] || {};
|
|
33
|
+
return i[e] || (i[e] = t());
|
|
34
|
+
}
|
|
35
|
+
const ht = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, kt = "Sentry Logger ", V = [
|
|
36
|
+
"debug",
|
|
37
|
+
"info",
|
|
38
|
+
"warn",
|
|
39
|
+
"error",
|
|
40
|
+
"log",
|
|
41
|
+
"assert",
|
|
42
|
+
"trace"
|
|
43
|
+
], W = {};
|
|
44
|
+
function lt(e) {
|
|
45
|
+
if (!("console" in S))
|
|
46
|
+
return e();
|
|
47
|
+
const t = S.console, n = {}, s = Object.keys(W);
|
|
48
|
+
s.forEach((r) => {
|
|
49
|
+
const i = W[r];
|
|
50
|
+
n[r] = t[r], t[r] = i;
|
|
51
|
+
});
|
|
52
|
+
try {
|
|
53
|
+
return e();
|
|
54
|
+
} finally {
|
|
55
|
+
s.forEach((r) => {
|
|
56
|
+
t[r] = n[r];
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function Pt() {
|
|
61
|
+
let e = !1;
|
|
62
|
+
const t = {
|
|
63
|
+
enable: () => {
|
|
64
|
+
e = !0;
|
|
65
|
+
},
|
|
66
|
+
disable: () => {
|
|
67
|
+
e = !1;
|
|
68
|
+
},
|
|
69
|
+
isEnabled: () => e
|
|
70
|
+
};
|
|
71
|
+
return ht ? V.forEach((n) => {
|
|
72
|
+
t[n] = (...s) => {
|
|
73
|
+
e && lt(() => {
|
|
74
|
+
S.console[n](`${kt}[${n}]:`, ...s);
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
}) : V.forEach((n) => {
|
|
78
|
+
t[n] = () => {
|
|
79
|
+
};
|
|
80
|
+
}), t;
|
|
81
|
+
}
|
|
82
|
+
const _ = Pt();
|
|
83
|
+
function Mt(e, t = !1) {
|
|
84
|
+
const { host: n, path: s, pass: r, port: i, projectId: o, protocol: a, publicKey: u } = e;
|
|
85
|
+
return `${a}://${u}${t && r ? `:${r}` : ""}@${n}${i ? `:${i}` : ""}/${s && `${s}/`}${o}`;
|
|
86
|
+
}
|
|
87
|
+
function T(e, t, n) {
|
|
88
|
+
try {
|
|
89
|
+
Object.defineProperty(e, t, {
|
|
90
|
+
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
|
|
91
|
+
value: n,
|
|
92
|
+
writable: !0,
|
|
93
|
+
configurable: !0
|
|
94
|
+
});
|
|
95
|
+
} catch {
|
|
96
|
+
ht && _.log(`Failed to add non-enumerable property "${t}" to object`, e);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function b(e) {
|
|
100
|
+
return x(e, /* @__PURE__ */ new Map());
|
|
101
|
+
}
|
|
102
|
+
function x(e, t) {
|
|
103
|
+
if (Lt(e)) {
|
|
104
|
+
const n = t.get(e);
|
|
105
|
+
if (n !== void 0)
|
|
106
|
+
return n;
|
|
107
|
+
const s = {};
|
|
108
|
+
t.set(e, s);
|
|
109
|
+
for (const r of Object.keys(e))
|
|
110
|
+
typeof e[r] < "u" && (s[r] = x(e[r], t));
|
|
111
|
+
return s;
|
|
112
|
+
}
|
|
113
|
+
if (Array.isArray(e)) {
|
|
114
|
+
const n = t.get(e);
|
|
115
|
+
if (n !== void 0)
|
|
116
|
+
return n;
|
|
117
|
+
const s = [];
|
|
118
|
+
return t.set(e, s), e.forEach((r) => {
|
|
119
|
+
s.push(x(r, t));
|
|
120
|
+
}), s;
|
|
121
|
+
}
|
|
122
|
+
return e;
|
|
123
|
+
}
|
|
124
|
+
function Lt(e) {
|
|
125
|
+
if (!_t(e))
|
|
126
|
+
return !1;
|
|
127
|
+
try {
|
|
128
|
+
const t = Object.getPrototypeOf(e).constructor.name;
|
|
129
|
+
return !t || t === "Object";
|
|
130
|
+
} catch {
|
|
131
|
+
return !0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const St = 1e3;
|
|
135
|
+
function gt() {
|
|
136
|
+
return Date.now() / St;
|
|
137
|
+
}
|
|
138
|
+
function xt() {
|
|
139
|
+
const { performance: e } = S;
|
|
140
|
+
if (!e || !e.now)
|
|
141
|
+
return gt;
|
|
142
|
+
const t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin;
|
|
143
|
+
return () => (n + e.now()) / St;
|
|
144
|
+
}
|
|
145
|
+
const $ = xt();
|
|
146
|
+
(() => {
|
|
147
|
+
const { performance: e } = S;
|
|
148
|
+
if (!e || !e.now)
|
|
149
|
+
return;
|
|
150
|
+
const t = 3600 * 1e3, n = e.now(), s = Date.now(), r = e.timeOrigin ? Math.abs(e.timeOrigin + n - s) : t, i = r < t, o = e.timing && e.timing.navigationStart, u = typeof o == "number" ? Math.abs(o + n - s) : t, c = u < t;
|
|
151
|
+
return i || c ? r <= u ? e.timeOrigin : o : s;
|
|
152
|
+
})();
|
|
153
|
+
function h() {
|
|
154
|
+
const e = S, t = e.crypto || e.msCrypto;
|
|
155
|
+
let n = () => Math.random() * 16;
|
|
156
|
+
try {
|
|
157
|
+
if (t && t.randomUUID)
|
|
158
|
+
return t.randomUUID().replace(/-/g, "");
|
|
159
|
+
t && t.getRandomValues && (n = () => {
|
|
160
|
+
const s = new Uint8Array(1);
|
|
161
|
+
return t.getRandomValues(s), s[0];
|
|
162
|
+
});
|
|
163
|
+
} catch {
|
|
164
|
+
}
|
|
165
|
+
return ("10000000100040008000" + 1e11).replace(
|
|
166
|
+
/[018]/g,
|
|
167
|
+
(s) => (
|
|
168
|
+
// eslint-disable-next-line no-bitwise
|
|
169
|
+
(s ^ (n() & 15) >> s / 4).toString(16)
|
|
170
|
+
)
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
const Ut = "sentry-", Bt = /^sentry-/;
|
|
174
|
+
function Ft(e) {
|
|
175
|
+
const t = Yt(e);
|
|
176
|
+
if (!t)
|
|
177
|
+
return;
|
|
178
|
+
const n = Object.entries(t).reduce((s, [r, i]) => {
|
|
179
|
+
if (r.match(Bt)) {
|
|
180
|
+
const o = r.slice(Ut.length);
|
|
181
|
+
s[o] = i;
|
|
182
|
+
}
|
|
183
|
+
return s;
|
|
184
|
+
}, {});
|
|
185
|
+
if (Object.keys(n).length > 0)
|
|
186
|
+
return n;
|
|
187
|
+
}
|
|
188
|
+
function Yt(e) {
|
|
189
|
+
if (!(!e || !Dt(e) && !Array.isArray(e)))
|
|
190
|
+
return Array.isArray(e) ? e.reduce((t, n) => {
|
|
191
|
+
const s = Z(n);
|
|
192
|
+
return Object.entries(s).forEach(([r, i]) => {
|
|
193
|
+
t[r] = i;
|
|
194
|
+
}), t;
|
|
195
|
+
}, {}) : Z(e);
|
|
196
|
+
}
|
|
197
|
+
function Z(e) {
|
|
198
|
+
return e.split(",").map((t) => t.split("=").map((n) => decodeURIComponent(n.trim()))).reduce((t, [n, s]) => (n && s && (t[n] = s), t), {});
|
|
199
|
+
}
|
|
200
|
+
function jt(e, t = []) {
|
|
201
|
+
return [e, t];
|
|
202
|
+
}
|
|
203
|
+
function Gt(e) {
|
|
204
|
+
return [{
|
|
205
|
+
type: "span"
|
|
206
|
+
}, e];
|
|
207
|
+
}
|
|
208
|
+
function z() {
|
|
209
|
+
return {
|
|
210
|
+
traceId: h(),
|
|
211
|
+
spanId: h().substring(16)
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
const f = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
215
|
+
function R() {
|
|
216
|
+
return G(S), S;
|
|
217
|
+
}
|
|
218
|
+
function G(e) {
|
|
219
|
+
const t = e.__SENTRY__ = e.__SENTRY__ || {};
|
|
220
|
+
return t.version = t.version || C, t[C] = t[C] || {};
|
|
221
|
+
}
|
|
222
|
+
function Kt(e, t = {}) {
|
|
223
|
+
if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), !e.did && !t.did && (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || $(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : h()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration)
|
|
224
|
+
e.duration = void 0;
|
|
225
|
+
else if (typeof t.duration == "number")
|
|
226
|
+
e.duration = t.duration;
|
|
227
|
+
else {
|
|
228
|
+
const n = e.timestamp - e.started;
|
|
229
|
+
e.duration = n >= 0 ? n : 0;
|
|
230
|
+
}
|
|
231
|
+
t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
|
|
232
|
+
}
|
|
233
|
+
const U = "_sentrySpan";
|
|
234
|
+
function B(e, t) {
|
|
235
|
+
t ? T(e, U, t) : delete e[U];
|
|
236
|
+
}
|
|
237
|
+
function M(e) {
|
|
238
|
+
return e[U];
|
|
239
|
+
}
|
|
240
|
+
const qt = 100;
|
|
241
|
+
class K {
|
|
242
|
+
/** Flag if notifying is happening. */
|
|
243
|
+
/** Callback for client to receive scope changes. */
|
|
244
|
+
/** Callback list that will be called during event processing. */
|
|
245
|
+
/** Array of breadcrumbs. */
|
|
246
|
+
/** User */
|
|
247
|
+
/** Tags */
|
|
248
|
+
/** Extra */
|
|
249
|
+
/** Contexts */
|
|
250
|
+
/** Attachments */
|
|
251
|
+
/** Propagation Context for distributed tracing */
|
|
252
|
+
/**
|
|
253
|
+
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
|
|
254
|
+
* sent to Sentry
|
|
255
|
+
*/
|
|
256
|
+
/** Fingerprint */
|
|
257
|
+
/** Severity */
|
|
258
|
+
/**
|
|
259
|
+
* Transaction Name
|
|
260
|
+
*
|
|
261
|
+
* IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.
|
|
262
|
+
* It's purpose is to assign a transaction to the scope that's added to non-transaction events.
|
|
263
|
+
*/
|
|
264
|
+
/** Session */
|
|
265
|
+
/** Request Mode Session Status */
|
|
266
|
+
/** The client on this scope */
|
|
267
|
+
/** Contains the last event id of a captured event. */
|
|
268
|
+
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
|
|
269
|
+
constructor() {
|
|
270
|
+
this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = z();
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* @inheritDoc
|
|
274
|
+
*/
|
|
275
|
+
clone() {
|
|
276
|
+
const t = new K();
|
|
277
|
+
return t._breadcrumbs = [...this._breadcrumbs], t._tags = { ...this._tags }, t._extra = { ...this._extra }, t._contexts = { ...this._contexts }, t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._requestSession = this._requestSession, t._attachments = [...this._attachments], t._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, t._propagationContext = { ...this._propagationContext }, t._client = this._client, t._lastEventId = this._lastEventId, B(t, M(this)), t;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* @inheritDoc
|
|
281
|
+
*/
|
|
282
|
+
setClient(t) {
|
|
283
|
+
this._client = t;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @inheritDoc
|
|
287
|
+
*/
|
|
288
|
+
setLastEventId(t) {
|
|
289
|
+
this._lastEventId = t;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* @inheritDoc
|
|
293
|
+
*/
|
|
294
|
+
getClient() {
|
|
295
|
+
return this._client;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* @inheritDoc
|
|
299
|
+
*/
|
|
300
|
+
lastEventId() {
|
|
301
|
+
return this._lastEventId;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* @inheritDoc
|
|
305
|
+
*/
|
|
306
|
+
addScopeListener(t) {
|
|
307
|
+
this._scopeListeners.push(t);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @inheritDoc
|
|
311
|
+
*/
|
|
312
|
+
addEventProcessor(t) {
|
|
313
|
+
return this._eventProcessors.push(t), this;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* @inheritDoc
|
|
317
|
+
*/
|
|
318
|
+
setUser(t) {
|
|
319
|
+
return this._user = t || {
|
|
320
|
+
email: void 0,
|
|
321
|
+
id: void 0,
|
|
322
|
+
ip_address: void 0,
|
|
323
|
+
username: void 0
|
|
324
|
+
}, this._session && Kt(this._session, { user: t }), this._notifyScopeListeners(), this;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* @inheritDoc
|
|
328
|
+
*/
|
|
329
|
+
getUser() {
|
|
330
|
+
return this._user;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* @inheritDoc
|
|
334
|
+
*/
|
|
335
|
+
getRequestSession() {
|
|
336
|
+
return this._requestSession;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* @inheritDoc
|
|
340
|
+
*/
|
|
341
|
+
setRequestSession(t) {
|
|
342
|
+
return this._requestSession = t, this;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* @inheritDoc
|
|
346
|
+
*/
|
|
347
|
+
setTags(t) {
|
|
348
|
+
return this._tags = {
|
|
349
|
+
...this._tags,
|
|
350
|
+
...t
|
|
351
|
+
}, this._notifyScopeListeners(), this;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* @inheritDoc
|
|
355
|
+
*/
|
|
356
|
+
setTag(t, n) {
|
|
357
|
+
return this._tags = { ...this._tags, [t]: n }, this._notifyScopeListeners(), this;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* @inheritDoc
|
|
361
|
+
*/
|
|
362
|
+
setExtras(t) {
|
|
363
|
+
return this._extra = {
|
|
364
|
+
...this._extra,
|
|
365
|
+
...t
|
|
366
|
+
}, this._notifyScopeListeners(), this;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* @inheritDoc
|
|
370
|
+
*/
|
|
371
|
+
setExtra(t, n) {
|
|
372
|
+
return this._extra = { ...this._extra, [t]: n }, this._notifyScopeListeners(), this;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* @inheritDoc
|
|
376
|
+
*/
|
|
377
|
+
setFingerprint(t) {
|
|
378
|
+
return this._fingerprint = t, this._notifyScopeListeners(), this;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* @inheritDoc
|
|
382
|
+
*/
|
|
383
|
+
setLevel(t) {
|
|
384
|
+
return this._level = t, this._notifyScopeListeners(), this;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* @inheritDoc
|
|
388
|
+
*/
|
|
389
|
+
setTransactionName(t) {
|
|
390
|
+
return this._transactionName = t, this._notifyScopeListeners(), this;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* @inheritDoc
|
|
394
|
+
*/
|
|
395
|
+
setContext(t, n) {
|
|
396
|
+
return n === null ? delete this._contexts[t] : this._contexts[t] = n, this._notifyScopeListeners(), this;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* @inheritDoc
|
|
400
|
+
*/
|
|
401
|
+
setSession(t) {
|
|
402
|
+
return t ? this._session = t : delete this._session, this._notifyScopeListeners(), this;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* @inheritDoc
|
|
406
|
+
*/
|
|
407
|
+
getSession() {
|
|
408
|
+
return this._session;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @inheritDoc
|
|
412
|
+
*/
|
|
413
|
+
update(t) {
|
|
414
|
+
if (!t)
|
|
415
|
+
return this;
|
|
416
|
+
const n = typeof t == "function" ? t(this) : t, [s, r] = n instanceof I ? [n.getScopeData(), n.getRequestSession()] : _t(n) ? [t, t.requestSession] : [], { tags: i, extra: o, user: a, contexts: u, level: c, fingerprint: d = [], propagationContext: p } = s || {};
|
|
417
|
+
return this._tags = { ...this._tags, ...i }, this._extra = { ...this._extra, ...o }, this._contexts = { ...this._contexts, ...u }, a && Object.keys(a).length && (this._user = a), c && (this._level = c), d.length && (this._fingerprint = d), p && (this._propagationContext = p), r && (this._requestSession = r), this;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* @inheritDoc
|
|
421
|
+
*/
|
|
422
|
+
clear() {
|
|
423
|
+
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, B(this, void 0), this._attachments = [], this._propagationContext = z(), this._notifyScopeListeners(), this;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* @inheritDoc
|
|
427
|
+
*/
|
|
428
|
+
addBreadcrumb(t, n) {
|
|
429
|
+
const s = typeof n == "number" ? n : qt;
|
|
430
|
+
if (s <= 0)
|
|
431
|
+
return this;
|
|
432
|
+
const r = {
|
|
433
|
+
timestamp: gt(),
|
|
434
|
+
...t
|
|
435
|
+
}, i = this._breadcrumbs;
|
|
436
|
+
return i.push(r), this._breadcrumbs = i.length > s ? i.slice(-s) : i, this._notifyScopeListeners(), this;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* @inheritDoc
|
|
440
|
+
*/
|
|
441
|
+
getLastBreadcrumb() {
|
|
442
|
+
return this._breadcrumbs[this._breadcrumbs.length - 1];
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @inheritDoc
|
|
446
|
+
*/
|
|
447
|
+
clearBreadcrumbs() {
|
|
448
|
+
return this._breadcrumbs = [], this._notifyScopeListeners(), this;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* @inheritDoc
|
|
452
|
+
*/
|
|
453
|
+
addAttachment(t) {
|
|
454
|
+
return this._attachments.push(t), this;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* @inheritDoc
|
|
458
|
+
*/
|
|
459
|
+
clearAttachments() {
|
|
460
|
+
return this._attachments = [], this;
|
|
461
|
+
}
|
|
462
|
+
/** @inheritDoc */
|
|
463
|
+
getScopeData() {
|
|
464
|
+
return {
|
|
465
|
+
breadcrumbs: this._breadcrumbs,
|
|
466
|
+
attachments: this._attachments,
|
|
467
|
+
contexts: this._contexts,
|
|
468
|
+
tags: this._tags,
|
|
469
|
+
extra: this._extra,
|
|
470
|
+
user: this._user,
|
|
471
|
+
level: this._level,
|
|
472
|
+
fingerprint: this._fingerprint || [],
|
|
473
|
+
eventProcessors: this._eventProcessors,
|
|
474
|
+
propagationContext: this._propagationContext,
|
|
475
|
+
sdkProcessingMetadata: this._sdkProcessingMetadata,
|
|
476
|
+
transactionName: this._transactionName,
|
|
477
|
+
span: M(this)
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* @inheritDoc
|
|
482
|
+
*/
|
|
483
|
+
setSDKProcessingMetadata(t) {
|
|
484
|
+
return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...t }, this;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* @inheritDoc
|
|
488
|
+
*/
|
|
489
|
+
setPropagationContext(t) {
|
|
490
|
+
return this._propagationContext = t, this;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* @inheritDoc
|
|
494
|
+
*/
|
|
495
|
+
getPropagationContext() {
|
|
496
|
+
return this._propagationContext;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* @inheritDoc
|
|
500
|
+
*/
|
|
501
|
+
captureException(t, n) {
|
|
502
|
+
const s = n && n.event_id ? n.event_id : h();
|
|
503
|
+
if (!this._client)
|
|
504
|
+
return _.warn("No client configured on scope - will not capture exception!"), s;
|
|
505
|
+
const r = new Error("Sentry syntheticException");
|
|
506
|
+
return this._client.captureException(
|
|
507
|
+
t,
|
|
508
|
+
{
|
|
509
|
+
originalException: t,
|
|
510
|
+
syntheticException: r,
|
|
511
|
+
...n,
|
|
512
|
+
event_id: s
|
|
513
|
+
},
|
|
514
|
+
this
|
|
515
|
+
), s;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* @inheritDoc
|
|
519
|
+
*/
|
|
520
|
+
captureMessage(t, n, s) {
|
|
521
|
+
const r = s && s.event_id ? s.event_id : h();
|
|
522
|
+
if (!this._client)
|
|
523
|
+
return _.warn("No client configured on scope - will not capture message!"), r;
|
|
524
|
+
const i = new Error(t);
|
|
525
|
+
return this._client.captureMessage(
|
|
526
|
+
t,
|
|
527
|
+
n,
|
|
528
|
+
{
|
|
529
|
+
originalException: t,
|
|
530
|
+
syntheticException: i,
|
|
531
|
+
...s,
|
|
532
|
+
event_id: r
|
|
533
|
+
},
|
|
534
|
+
this
|
|
535
|
+
), r;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* @inheritDoc
|
|
539
|
+
*/
|
|
540
|
+
captureEvent(t, n) {
|
|
541
|
+
const s = n && n.event_id ? n.event_id : h();
|
|
542
|
+
return this._client ? (this._client.captureEvent(t, { ...n, event_id: s }, this), s) : (_.warn("No client configured on scope - will not capture event!"), s);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* This will be called on every set call.
|
|
546
|
+
*/
|
|
547
|
+
_notifyScopeListeners() {
|
|
548
|
+
this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((t) => {
|
|
549
|
+
t(this);
|
|
550
|
+
}), this._notifyingListeners = !1);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
const I = K;
|
|
554
|
+
function Jt() {
|
|
555
|
+
return ft("defaultCurrentScope", () => new I());
|
|
556
|
+
}
|
|
557
|
+
function Ht() {
|
|
558
|
+
return ft("defaultIsolationScope", () => new I());
|
|
559
|
+
}
|
|
560
|
+
class Xt {
|
|
561
|
+
constructor(t, n) {
|
|
562
|
+
let s;
|
|
563
|
+
t ? s = t : s = new I();
|
|
564
|
+
let r;
|
|
565
|
+
n ? r = n : r = new I(), this._stack = [{ scope: s }], this._isolationScope = r;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Fork a scope for the stack.
|
|
569
|
+
*/
|
|
570
|
+
withScope(t) {
|
|
571
|
+
const n = this._pushScope();
|
|
572
|
+
let s;
|
|
573
|
+
try {
|
|
574
|
+
s = t(n);
|
|
575
|
+
} catch (r) {
|
|
576
|
+
throw this._popScope(), r;
|
|
577
|
+
}
|
|
578
|
+
return vt(s) ? s.then(
|
|
579
|
+
(r) => (this._popScope(), r),
|
|
580
|
+
(r) => {
|
|
581
|
+
throw this._popScope(), r;
|
|
582
|
+
}
|
|
583
|
+
) : (this._popScope(), s);
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Get the client of the stack.
|
|
587
|
+
*/
|
|
588
|
+
getClient() {
|
|
589
|
+
return this.getStackTop().client;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Returns the scope of the top stack.
|
|
593
|
+
*/
|
|
594
|
+
getScope() {
|
|
595
|
+
return this.getStackTop().scope;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Get the isolation scope for the stack.
|
|
599
|
+
*/
|
|
600
|
+
getIsolationScope() {
|
|
601
|
+
return this._isolationScope;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Returns the topmost scope layer in the order domain > local > process.
|
|
605
|
+
*/
|
|
606
|
+
getStackTop() {
|
|
607
|
+
return this._stack[this._stack.length - 1];
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Push a scope to the stack.
|
|
611
|
+
*/
|
|
612
|
+
_pushScope() {
|
|
613
|
+
const t = this.getScope().clone();
|
|
614
|
+
return this._stack.push({
|
|
615
|
+
client: this.getClient(),
|
|
616
|
+
scope: t
|
|
617
|
+
}), t;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Pop a scope from the stack.
|
|
621
|
+
*/
|
|
622
|
+
_popScope() {
|
|
623
|
+
return this._stack.length <= 1 ? !1 : !!this._stack.pop();
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
function A() {
|
|
627
|
+
const e = R(), t = G(e);
|
|
628
|
+
return t.stack = t.stack || new Xt(Jt(), Ht());
|
|
629
|
+
}
|
|
630
|
+
function Vt(e) {
|
|
631
|
+
return A().withScope(e);
|
|
632
|
+
}
|
|
633
|
+
function Wt(e, t) {
|
|
634
|
+
const n = A();
|
|
635
|
+
return n.withScope(() => (n.getStackTop().scope = e, t(e)));
|
|
636
|
+
}
|
|
637
|
+
function Q(e) {
|
|
638
|
+
return A().withScope(() => e(A().getIsolationScope()));
|
|
639
|
+
}
|
|
640
|
+
function Zt() {
|
|
641
|
+
return {
|
|
642
|
+
withIsolationScope: Q,
|
|
643
|
+
withScope: Vt,
|
|
644
|
+
withSetScope: Wt,
|
|
645
|
+
withSetIsolationScope: (e, t) => Q(t),
|
|
646
|
+
getCurrentScope: () => A().getScope(),
|
|
647
|
+
getIsolationScope: () => A().getIsolationScope()
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
function v(e) {
|
|
651
|
+
const t = G(e);
|
|
652
|
+
return t.acs ? t.acs : Zt();
|
|
653
|
+
}
|
|
654
|
+
function N() {
|
|
655
|
+
const e = R();
|
|
656
|
+
return v(e).getCurrentScope();
|
|
657
|
+
}
|
|
658
|
+
function zt() {
|
|
659
|
+
const e = R();
|
|
660
|
+
return v(e).getIsolationScope();
|
|
661
|
+
}
|
|
662
|
+
function mt(...e) {
|
|
663
|
+
const t = R(), n = v(t);
|
|
664
|
+
if (e.length === 2) {
|
|
665
|
+
const [s, r] = e;
|
|
666
|
+
return s ? n.withSetScope(s, r) : n.withScope(r);
|
|
667
|
+
}
|
|
668
|
+
return n.withScope(e[0]);
|
|
669
|
+
}
|
|
670
|
+
function g() {
|
|
671
|
+
return N().getClient();
|
|
672
|
+
}
|
|
673
|
+
const Qt = "_sentryMetrics";
|
|
674
|
+
function F(e) {
|
|
675
|
+
const t = e[Qt];
|
|
676
|
+
if (!t)
|
|
677
|
+
return;
|
|
678
|
+
const n = {};
|
|
679
|
+
for (const [, [s, r]] of t)
|
|
680
|
+
(n[s] || (n[s] = [])).push(b(r));
|
|
681
|
+
return n;
|
|
682
|
+
}
|
|
683
|
+
const q = "sentry.source", yt = "sentry.sample_rate", Y = "sentry.op", D = "sentry.origin", te = "sentry.measurement_unit", ee = "sentry.measurement_value", ne = "sentry.profile_id", se = "sentry.exclusive_time", re = 0, ie = 1, Et = 0, Tt = 1;
|
|
684
|
+
function oe(e) {
|
|
685
|
+
const { spanId: t, traceId: n } = e.spanContext(), { data: s, op: r, parent_span_id: i, status: o, origin: a } = l(e);
|
|
686
|
+
return b({
|
|
687
|
+
parent_span_id: i,
|
|
688
|
+
span_id: t,
|
|
689
|
+
trace_id: n,
|
|
690
|
+
data: s,
|
|
691
|
+
op: r,
|
|
692
|
+
status: o,
|
|
693
|
+
origin: a
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
function E(e) {
|
|
697
|
+
return typeof e == "number" ? tt(e) : Array.isArray(e) ? e[0] + e[1] / 1e9 : e instanceof Date ? tt(e.getTime()) : $();
|
|
698
|
+
}
|
|
699
|
+
function tt(e) {
|
|
700
|
+
return e > 9999999999 ? e / 1e3 : e;
|
|
701
|
+
}
|
|
702
|
+
function l(e) {
|
|
703
|
+
if (ce(e))
|
|
704
|
+
return e.getSpanJSON();
|
|
705
|
+
try {
|
|
706
|
+
const { spanId: t, traceId: n } = e.spanContext();
|
|
707
|
+
if (ae(e)) {
|
|
708
|
+
const { attributes: s, startTime: r, name: i, endTime: o, parentSpanId: a, status: u } = e;
|
|
709
|
+
return b({
|
|
710
|
+
span_id: t,
|
|
711
|
+
trace_id: n,
|
|
712
|
+
data: s,
|
|
713
|
+
description: i,
|
|
714
|
+
parent_span_id: a,
|
|
715
|
+
start_timestamp: E(r),
|
|
716
|
+
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
717
|
+
timestamp: E(o) || void 0,
|
|
718
|
+
status: bt(u),
|
|
719
|
+
op: s[Y],
|
|
720
|
+
origin: s[D],
|
|
721
|
+
_metrics_summary: F(e)
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
return {
|
|
725
|
+
span_id: t,
|
|
726
|
+
trace_id: n
|
|
727
|
+
};
|
|
728
|
+
} catch {
|
|
729
|
+
return {};
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
function ae(e) {
|
|
733
|
+
const t = e;
|
|
734
|
+
return !!t.attributes && !!t.startTime && !!t.name && !!t.endTime && !!t.status;
|
|
735
|
+
}
|
|
736
|
+
function ce(e) {
|
|
737
|
+
return typeof e.getSpanJSON == "function";
|
|
738
|
+
}
|
|
739
|
+
function k(e) {
|
|
740
|
+
const { traceFlags: t } = e.spanContext();
|
|
741
|
+
return t === Tt;
|
|
742
|
+
}
|
|
743
|
+
function bt(e) {
|
|
744
|
+
if (!(!e || e.code === re))
|
|
745
|
+
return e.code === ie ? "ok" : e.message || "unknown_error";
|
|
746
|
+
}
|
|
747
|
+
const O = "_sentryChildSpans", j = "_sentryRootSpan";
|
|
748
|
+
function It(e, t) {
|
|
749
|
+
const n = e[j] || e;
|
|
750
|
+
T(t, j, n), e[O] ? e[O].add(t) : T(e, O, /* @__PURE__ */ new Set([t]));
|
|
751
|
+
}
|
|
752
|
+
function ue(e) {
|
|
753
|
+
const t = /* @__PURE__ */ new Set();
|
|
754
|
+
function n(s) {
|
|
755
|
+
if (!t.has(s) && k(s)) {
|
|
756
|
+
t.add(s);
|
|
757
|
+
const r = s[O] ? Array.from(s[O]) : [];
|
|
758
|
+
for (const i of r)
|
|
759
|
+
n(i);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
return n(e), Array.from(t);
|
|
763
|
+
}
|
|
764
|
+
function y(e) {
|
|
765
|
+
return e[j] || e;
|
|
766
|
+
}
|
|
767
|
+
function et() {
|
|
768
|
+
const e = R(), t = v(e);
|
|
769
|
+
return t.getActiveSpan ? t.getActiveSpan() : M(N());
|
|
770
|
+
}
|
|
771
|
+
const At = "_sentryScope", Nt = "_sentryIsolationScope";
|
|
772
|
+
function de(e, t, n) {
|
|
773
|
+
e && (T(e, Nt, n), T(e, At, t));
|
|
774
|
+
}
|
|
775
|
+
function nt(e) {
|
|
776
|
+
return {
|
|
777
|
+
scope: e[At],
|
|
778
|
+
isolationScope: e[Nt]
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
function Rt(e) {
|
|
782
|
+
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
|
|
783
|
+
return !1;
|
|
784
|
+
const t = e || pe();
|
|
785
|
+
return !!t && (t.enableTracing || "tracesSampleRate" in t || "tracesSampler" in t);
|
|
786
|
+
}
|
|
787
|
+
function pe() {
|
|
788
|
+
const e = g();
|
|
789
|
+
return e && e.getOptions();
|
|
790
|
+
}
|
|
791
|
+
class J {
|
|
792
|
+
constructor(t = {}) {
|
|
793
|
+
this._traceId = t.traceId || h(), this._spanId = t.spanId || h().substring(16);
|
|
794
|
+
}
|
|
795
|
+
/** @inheritdoc */
|
|
796
|
+
spanContext() {
|
|
797
|
+
return {
|
|
798
|
+
spanId: this._spanId,
|
|
799
|
+
traceId: this._traceId,
|
|
800
|
+
traceFlags: Et
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
/** @inheritdoc */
|
|
804
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
805
|
+
end(t) {
|
|
806
|
+
}
|
|
807
|
+
/** @inheritdoc */
|
|
808
|
+
setAttribute(t, n) {
|
|
809
|
+
return this;
|
|
810
|
+
}
|
|
811
|
+
/** @inheritdoc */
|
|
812
|
+
setAttributes(t) {
|
|
813
|
+
return this;
|
|
814
|
+
}
|
|
815
|
+
/** @inheritdoc */
|
|
816
|
+
setStatus(t) {
|
|
817
|
+
return this;
|
|
818
|
+
}
|
|
819
|
+
/** @inheritdoc */
|
|
820
|
+
updateName(t) {
|
|
821
|
+
return this;
|
|
822
|
+
}
|
|
823
|
+
/** @inheritdoc */
|
|
824
|
+
isRecording() {
|
|
825
|
+
return !1;
|
|
826
|
+
}
|
|
827
|
+
/** @inheritdoc */
|
|
828
|
+
addEvent(t, n, s) {
|
|
829
|
+
return this;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* This should generally not be used,
|
|
833
|
+
* but we need it for being comliant with the OTEL Span interface.
|
|
834
|
+
*
|
|
835
|
+
* @hidden
|
|
836
|
+
* @internal
|
|
837
|
+
*/
|
|
838
|
+
addLink(t) {
|
|
839
|
+
return this;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* This should generally not be used,
|
|
843
|
+
* but we need it for being comliant with the OTEL Span interface.
|
|
844
|
+
*
|
|
845
|
+
* @hidden
|
|
846
|
+
* @internal
|
|
847
|
+
*/
|
|
848
|
+
addLinks(t) {
|
|
849
|
+
return this;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* This should generally not be used,
|
|
853
|
+
* but we need it for being comliant with the OTEL Span interface.
|
|
854
|
+
*
|
|
855
|
+
* @hidden
|
|
856
|
+
* @internal
|
|
857
|
+
*/
|
|
858
|
+
recordException(t, n) {
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
const _e = "production", Ct = "_frozenDsc";
|
|
862
|
+
function st(e, t) {
|
|
863
|
+
T(e, Ct, t);
|
|
864
|
+
}
|
|
865
|
+
function fe(e, t) {
|
|
866
|
+
const n = t.getOptions(), { publicKey: s } = t.getDsn() || {}, r = b({
|
|
867
|
+
environment: n.environment || _e,
|
|
868
|
+
release: n.release,
|
|
869
|
+
public_key: s,
|
|
870
|
+
trace_id: e
|
|
871
|
+
});
|
|
872
|
+
return t.emit("createDsc", r), r;
|
|
873
|
+
}
|
|
874
|
+
function H(e) {
|
|
875
|
+
const t = g();
|
|
876
|
+
if (!t)
|
|
877
|
+
return {};
|
|
878
|
+
const n = fe(l(e).trace_id || "", t), s = y(e), r = s[Ct];
|
|
879
|
+
if (r)
|
|
880
|
+
return r;
|
|
881
|
+
const i = s.spanContext().traceState, o = i && i.get("sentry.dsc"), a = o && Ft(o);
|
|
882
|
+
if (a)
|
|
883
|
+
return a;
|
|
884
|
+
const u = l(s), c = u.data || {}, d = c[yt];
|
|
885
|
+
d != null && (n.sample_rate = `${d}`);
|
|
886
|
+
const p = c[q], m = u.description;
|
|
887
|
+
return p !== "url" && m && (n.transaction = m), n.sampled = String(k(s)), t.emit("createDsc", n, s), n;
|
|
888
|
+
}
|
|
889
|
+
function he(e) {
|
|
890
|
+
if (!f) return;
|
|
891
|
+
const { description: t = "< unknown name >", op: n = "< unknown op >", parent_span_id: s } = l(e), { spanId: r } = e.spanContext(), i = k(e), o = y(e), a = o === e, u = `[Tracing] Starting ${i ? "sampled" : "unsampled"} ${a ? "root " : ""}span`, c = [`op: ${n}`, `name: ${t}`, `ID: ${r}`];
|
|
892
|
+
if (s && c.push(`parent ID: ${s}`), !a) {
|
|
893
|
+
const { op: d, description: p } = l(o);
|
|
894
|
+
c.push(`root ID: ${o.spanContext().spanId}`), d && c.push(`root op: ${d}`), p && c.push(`root description: ${p}`);
|
|
895
|
+
}
|
|
896
|
+
_.log(`${u}
|
|
897
|
+
${c.join(`
|
|
898
|
+
`)}`);
|
|
899
|
+
}
|
|
900
|
+
function le(e) {
|
|
901
|
+
if (!f) return;
|
|
902
|
+
const { description: t = "< unknown name >", op: n = "< unknown op >" } = l(e), { spanId: s } = e.spanContext(), i = y(e) === e, o = `[Tracing] Finishing "${n}" ${i ? "root " : ""}span "${t}" with ID ${s}`;
|
|
903
|
+
_.log(o);
|
|
904
|
+
}
|
|
905
|
+
function Se(e) {
|
|
906
|
+
if (typeof e == "boolean")
|
|
907
|
+
return Number(e);
|
|
908
|
+
const t = typeof e == "string" ? parseFloat(e) : e;
|
|
909
|
+
if (typeof t != "number" || isNaN(t) || t < 0 || t > 1) {
|
|
910
|
+
f && _.warn(
|
|
911
|
+
`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
|
|
912
|
+
e
|
|
913
|
+
)} of type ${JSON.stringify(typeof e)}.`
|
|
914
|
+
);
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
return t;
|
|
918
|
+
}
|
|
919
|
+
function ge(e, t) {
|
|
920
|
+
if (!Rt(e))
|
|
921
|
+
return [!1];
|
|
922
|
+
let n;
|
|
923
|
+
typeof e.tracesSampler == "function" ? n = e.tracesSampler(t) : t.parentSampled !== void 0 ? n = t.parentSampled : typeof e.tracesSampleRate < "u" ? n = e.tracesSampleRate : n = 1;
|
|
924
|
+
const s = Se(n);
|
|
925
|
+
return s === void 0 ? (f && _.warn("[Tracing] Discarding transaction because of invalid sample rate."), [!1]) : s ? Math.random() < s ? [!0, s] : (f && _.log(
|
|
926
|
+
`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(
|
|
927
|
+
n
|
|
928
|
+
)})`
|
|
929
|
+
), [!1, s]) : (f && _.log(
|
|
930
|
+
`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`
|
|
931
|
+
), [!1, s]);
|
|
932
|
+
}
|
|
933
|
+
function me(e, t) {
|
|
934
|
+
function n(d) {
|
|
935
|
+
return !!d.trace_id && !!d.public_key;
|
|
936
|
+
}
|
|
937
|
+
const s = H(e[0]), r = t && t.getDsn(), i = t && t.getOptions().tunnel, o = {
|
|
938
|
+
sent_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
939
|
+
...n(s) && { trace: s },
|
|
940
|
+
...!!i && r && { dsn: Mt(r) }
|
|
941
|
+
}, a = t && t.getOptions().beforeSendSpan, u = a ? (d) => a(l(d)) : (d) => l(d), c = [];
|
|
942
|
+
for (const d of e) {
|
|
943
|
+
const p = u(d);
|
|
944
|
+
p && c.push(Gt(p));
|
|
945
|
+
}
|
|
946
|
+
return jt(o, c);
|
|
947
|
+
}
|
|
948
|
+
function rt(e) {
|
|
949
|
+
if (!e || e.length === 0)
|
|
950
|
+
return;
|
|
951
|
+
const t = {};
|
|
952
|
+
return e.forEach((n) => {
|
|
953
|
+
const s = n.attributes || {}, r = s[te], i = s[ee];
|
|
954
|
+
typeof r == "string" && typeof i == "number" && (t[n.name] = { value: i, unit: r });
|
|
955
|
+
}), t;
|
|
956
|
+
}
|
|
957
|
+
const it = 1e3;
|
|
958
|
+
class X {
|
|
959
|
+
/** Epoch timestamp in seconds when the span started. */
|
|
960
|
+
/** Epoch timestamp in seconds when the span ended. */
|
|
961
|
+
/** Internal keeper of the status */
|
|
962
|
+
/** The timed events added to this span. */
|
|
963
|
+
/** if true, treat span as a standalone span (not part of a transaction) */
|
|
964
|
+
/**
|
|
965
|
+
* You should never call the constructor manually, always use `Sentry.startSpan()`
|
|
966
|
+
* or other span methods.
|
|
967
|
+
* @internal
|
|
968
|
+
* @hideconstructor
|
|
969
|
+
* @hidden
|
|
970
|
+
*/
|
|
971
|
+
constructor(t = {}) {
|
|
972
|
+
this._traceId = t.traceId || h(), this._spanId = t.spanId || h().substring(16), this._startTime = t.startTimestamp || $(), this._attributes = {}, this.setAttributes({
|
|
973
|
+
[D]: "manual",
|
|
974
|
+
[Y]: t.op,
|
|
975
|
+
...t.attributes
|
|
976
|
+
}), this._name = t.name, t.parentSpanId && (this._parentSpanId = t.parentSpanId), "sampled" in t && (this._sampled = t.sampled), t.endTimestamp && (this._endTime = t.endTimestamp), this._events = [], this._isStandaloneSpan = t.isStandalone, this._endTime && this._onSpanEnded();
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* This should generally not be used,
|
|
980
|
+
* but it is needed for being compliant with the OTEL Span interface.
|
|
981
|
+
*
|
|
982
|
+
* @hidden
|
|
983
|
+
* @internal
|
|
984
|
+
*/
|
|
985
|
+
addLink(t) {
|
|
986
|
+
return this;
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* This should generally not be used,
|
|
990
|
+
* but it is needed for being compliant with the OTEL Span interface.
|
|
991
|
+
*
|
|
992
|
+
* @hidden
|
|
993
|
+
* @internal
|
|
994
|
+
*/
|
|
995
|
+
addLinks(t) {
|
|
996
|
+
return this;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* This should generally not be used,
|
|
1000
|
+
* but it is needed for being compliant with the OTEL Span interface.
|
|
1001
|
+
*
|
|
1002
|
+
* @hidden
|
|
1003
|
+
* @internal
|
|
1004
|
+
*/
|
|
1005
|
+
recordException(t, n) {
|
|
1006
|
+
}
|
|
1007
|
+
/** @inheritdoc */
|
|
1008
|
+
spanContext() {
|
|
1009
|
+
const { _spanId: t, _traceId: n, _sampled: s } = this;
|
|
1010
|
+
return {
|
|
1011
|
+
spanId: t,
|
|
1012
|
+
traceId: n,
|
|
1013
|
+
traceFlags: s ? Tt : Et
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
1016
|
+
/** @inheritdoc */
|
|
1017
|
+
setAttribute(t, n) {
|
|
1018
|
+
return n === void 0 ? delete this._attributes[t] : this._attributes[t] = n, this;
|
|
1019
|
+
}
|
|
1020
|
+
/** @inheritdoc */
|
|
1021
|
+
setAttributes(t) {
|
|
1022
|
+
return Object.keys(t).forEach((n) => this.setAttribute(n, t[n])), this;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* This should generally not be used,
|
|
1026
|
+
* but we need it for browser tracing where we want to adjust the start time afterwards.
|
|
1027
|
+
* USE THIS WITH CAUTION!
|
|
1028
|
+
*
|
|
1029
|
+
* @hidden
|
|
1030
|
+
* @internal
|
|
1031
|
+
*/
|
|
1032
|
+
updateStartTime(t) {
|
|
1033
|
+
this._startTime = E(t);
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* @inheritDoc
|
|
1037
|
+
*/
|
|
1038
|
+
setStatus(t) {
|
|
1039
|
+
return this._status = t, this;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* @inheritDoc
|
|
1043
|
+
*/
|
|
1044
|
+
updateName(t) {
|
|
1045
|
+
return this._name = t, this;
|
|
1046
|
+
}
|
|
1047
|
+
/** @inheritdoc */
|
|
1048
|
+
end(t) {
|
|
1049
|
+
this._endTime || (this._endTime = E(t), le(this), this._onSpanEnded());
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Get JSON representation of this span.
|
|
1053
|
+
*
|
|
1054
|
+
* @hidden
|
|
1055
|
+
* @internal This method is purely for internal purposes and should not be used outside
|
|
1056
|
+
* of SDK code. If you need to get a JSON representation of a span,
|
|
1057
|
+
* use `spanToJSON(span)` instead.
|
|
1058
|
+
*/
|
|
1059
|
+
getSpanJSON() {
|
|
1060
|
+
return b({
|
|
1061
|
+
data: this._attributes,
|
|
1062
|
+
description: this._name,
|
|
1063
|
+
op: this._attributes[Y],
|
|
1064
|
+
parent_span_id: this._parentSpanId,
|
|
1065
|
+
span_id: this._spanId,
|
|
1066
|
+
start_timestamp: this._startTime,
|
|
1067
|
+
status: bt(this._status),
|
|
1068
|
+
timestamp: this._endTime,
|
|
1069
|
+
trace_id: this._traceId,
|
|
1070
|
+
origin: this._attributes[D],
|
|
1071
|
+
_metrics_summary: F(this),
|
|
1072
|
+
profile_id: this._attributes[ne],
|
|
1073
|
+
exclusive_time: this._attributes[se],
|
|
1074
|
+
measurements: rt(this._events),
|
|
1075
|
+
is_segment: this._isStandaloneSpan && y(this) === this || void 0,
|
|
1076
|
+
segment_id: this._isStandaloneSpan ? y(this).spanContext().spanId : void 0
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
/** @inheritdoc */
|
|
1080
|
+
isRecording() {
|
|
1081
|
+
return !this._endTime && !!this._sampled;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* @inheritdoc
|
|
1085
|
+
*/
|
|
1086
|
+
addEvent(t, n, s) {
|
|
1087
|
+
f && _.log("[Tracing] Adding an event to span:", t);
|
|
1088
|
+
const r = ot(n) ? n : s || $(), i = ot(n) ? {} : n || {}, o = {
|
|
1089
|
+
name: t,
|
|
1090
|
+
time: E(r),
|
|
1091
|
+
attributes: i
|
|
1092
|
+
};
|
|
1093
|
+
return this._events.push(o), this;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* This method should generally not be used,
|
|
1097
|
+
* but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.
|
|
1098
|
+
* USE THIS WITH CAUTION!
|
|
1099
|
+
* @internal
|
|
1100
|
+
* @hidden
|
|
1101
|
+
* @experimental
|
|
1102
|
+
*/
|
|
1103
|
+
isStandaloneSpan() {
|
|
1104
|
+
return !!this._isStandaloneSpan;
|
|
1105
|
+
}
|
|
1106
|
+
/** Emit `spanEnd` when the span is ended. */
|
|
1107
|
+
_onSpanEnded() {
|
|
1108
|
+
const t = g();
|
|
1109
|
+
if (t && t.emit("spanEnd", this), !(this._isStandaloneSpan || this === y(this)))
|
|
1110
|
+
return;
|
|
1111
|
+
if (this._isStandaloneSpan) {
|
|
1112
|
+
this._sampled ? Ee(me([this], t)) : (f && _.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."), t && t.recordDroppedEvent("sample_rate", "span"));
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
const s = this._convertSpanToTransaction();
|
|
1116
|
+
s && (nt(this).scope || N()).captureEvent(s);
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Finish the transaction & prepare the event to send to Sentry.
|
|
1120
|
+
*/
|
|
1121
|
+
_convertSpanToTransaction() {
|
|
1122
|
+
if (!at(l(this)))
|
|
1123
|
+
return;
|
|
1124
|
+
this._name || (f && _.warn("Transaction has no name, falling back to `<unlabeled transaction>`."), this._name = "<unlabeled transaction>");
|
|
1125
|
+
const { scope: t, isolationScope: n } = nt(this), r = (t || N()).getClient() || g();
|
|
1126
|
+
if (this._sampled !== !0) {
|
|
1127
|
+
f && _.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), r && r.recordDroppedEvent("sample_rate", "transaction");
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
const o = ue(this).filter((p) => p !== this && !ye(p)).map((p) => l(p)).filter(at), a = this._attributes[q], u = {
|
|
1131
|
+
contexts: {
|
|
1132
|
+
trace: oe(this)
|
|
1133
|
+
},
|
|
1134
|
+
spans: (
|
|
1135
|
+
// spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here
|
|
1136
|
+
// we do not use spans anymore after this point
|
|
1137
|
+
o.length > it ? o.sort((p, m) => p.start_timestamp - m.start_timestamp).slice(0, it) : o
|
|
1138
|
+
),
|
|
1139
|
+
start_timestamp: this._startTime,
|
|
1140
|
+
timestamp: this._endTime,
|
|
1141
|
+
transaction: this._name,
|
|
1142
|
+
type: "transaction",
|
|
1143
|
+
sdkProcessingMetadata: {
|
|
1144
|
+
capturedSpanScope: t,
|
|
1145
|
+
capturedSpanIsolationScope: n,
|
|
1146
|
+
...b({
|
|
1147
|
+
dynamicSamplingContext: H(this)
|
|
1148
|
+
})
|
|
1149
|
+
},
|
|
1150
|
+
_metrics_summary: F(this),
|
|
1151
|
+
...a && {
|
|
1152
|
+
transaction_info: {
|
|
1153
|
+
source: a
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}, c = rt(this._events);
|
|
1157
|
+
return c && Object.keys(c).length && (f && _.log(
|
|
1158
|
+
"[Measurements] Adding measurements to transaction event",
|
|
1159
|
+
JSON.stringify(c, void 0, 2)
|
|
1160
|
+
), u.measurements = c), u;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
function ot(e) {
|
|
1164
|
+
return e && typeof e == "number" || e instanceof Date || Array.isArray(e);
|
|
1165
|
+
}
|
|
1166
|
+
function at(e) {
|
|
1167
|
+
return !!e.start_timestamp && !!e.timestamp && !!e.span_id && !!e.trace_id;
|
|
1168
|
+
}
|
|
1169
|
+
function ye(e) {
|
|
1170
|
+
return e instanceof X && e.isStandaloneSpan();
|
|
1171
|
+
}
|
|
1172
|
+
function Ee(e) {
|
|
1173
|
+
const t = g();
|
|
1174
|
+
if (!t)
|
|
1175
|
+
return;
|
|
1176
|
+
const n = e[1];
|
|
1177
|
+
if (!n || n.length === 0) {
|
|
1178
|
+
t.recordDroppedEvent("before_send", "span");
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
const s = t.getTransport();
|
|
1182
|
+
s && s.send(e).then(null, (r) => {
|
|
1183
|
+
f && _.error("Error while sending span:", r);
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
const Ot = "__SENTRY_SUPPRESS_TRACING__";
|
|
1187
|
+
function ct(e) {
|
|
1188
|
+
const t = wt();
|
|
1189
|
+
if (t.startInactiveSpan)
|
|
1190
|
+
return t.startInactiveSpan(e);
|
|
1191
|
+
const n = Ie(e), { forceTransaction: s, parentSpan: r } = e;
|
|
1192
|
+
return (e.scope ? (o) => mt(e.scope, o) : r !== void 0 ? (o) => Te(r, o) : (o) => o())(() => {
|
|
1193
|
+
const o = N(), a = Ne(o);
|
|
1194
|
+
return e.onlyIfParent && !a ? new J() : be({
|
|
1195
|
+
parentSpan: a,
|
|
1196
|
+
spanArguments: n,
|
|
1197
|
+
forceTransaction: s,
|
|
1198
|
+
scope: o
|
|
1199
|
+
});
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
function Te(e, t) {
|
|
1203
|
+
const n = wt();
|
|
1204
|
+
return n.withActiveSpan ? n.withActiveSpan(e, t) : mt((s) => (B(s, e || void 0), t(s)));
|
|
1205
|
+
}
|
|
1206
|
+
function be({
|
|
1207
|
+
parentSpan: e,
|
|
1208
|
+
spanArguments: t,
|
|
1209
|
+
forceTransaction: n,
|
|
1210
|
+
scope: s
|
|
1211
|
+
}) {
|
|
1212
|
+
if (!Rt())
|
|
1213
|
+
return new J();
|
|
1214
|
+
const r = zt();
|
|
1215
|
+
let i;
|
|
1216
|
+
if (e && !n)
|
|
1217
|
+
i = Ae(e, s, t), It(e, i);
|
|
1218
|
+
else if (e) {
|
|
1219
|
+
const o = H(e), { traceId: a, spanId: u } = e.spanContext(), c = k(e);
|
|
1220
|
+
i = ut(
|
|
1221
|
+
{
|
|
1222
|
+
traceId: a,
|
|
1223
|
+
parentSpanId: u,
|
|
1224
|
+
...t
|
|
1225
|
+
},
|
|
1226
|
+
s,
|
|
1227
|
+
c
|
|
1228
|
+
), st(i, o);
|
|
1229
|
+
} else {
|
|
1230
|
+
const {
|
|
1231
|
+
traceId: o,
|
|
1232
|
+
dsc: a,
|
|
1233
|
+
parentSpanId: u,
|
|
1234
|
+
sampled: c
|
|
1235
|
+
} = {
|
|
1236
|
+
...r.getPropagationContext(),
|
|
1237
|
+
...s.getPropagationContext()
|
|
1238
|
+
};
|
|
1239
|
+
i = ut(
|
|
1240
|
+
{
|
|
1241
|
+
traceId: o,
|
|
1242
|
+
parentSpanId: u,
|
|
1243
|
+
...t
|
|
1244
|
+
},
|
|
1245
|
+
s,
|
|
1246
|
+
c
|
|
1247
|
+
), a && st(i, a);
|
|
1248
|
+
}
|
|
1249
|
+
return he(i), de(i, s, r), i;
|
|
1250
|
+
}
|
|
1251
|
+
function Ie(e) {
|
|
1252
|
+
const n = {
|
|
1253
|
+
isStandalone: (e.experimental || {}).standalone,
|
|
1254
|
+
...e
|
|
1255
|
+
};
|
|
1256
|
+
if (e.startTime) {
|
|
1257
|
+
const s = { ...n };
|
|
1258
|
+
return s.startTimestamp = E(e.startTime), delete s.startTime, s;
|
|
1259
|
+
}
|
|
1260
|
+
return n;
|
|
1261
|
+
}
|
|
1262
|
+
function wt() {
|
|
1263
|
+
const e = R();
|
|
1264
|
+
return v(e);
|
|
1265
|
+
}
|
|
1266
|
+
function ut(e, t, n) {
|
|
1267
|
+
const s = g(), r = s && s.getOptions() || {}, { name: i = "", attributes: o } = e, [a, u] = t.getScopeData().sdkProcessingMetadata[Ot] ? [!1] : ge(r, {
|
|
1268
|
+
name: i,
|
|
1269
|
+
parentSampled: n,
|
|
1270
|
+
attributes: o,
|
|
1271
|
+
transactionContext: {
|
|
1272
|
+
name: i,
|
|
1273
|
+
parentSampled: n
|
|
1274
|
+
}
|
|
1275
|
+
}), c = new X({
|
|
1276
|
+
...e,
|
|
1277
|
+
attributes: {
|
|
1278
|
+
[q]: "custom",
|
|
1279
|
+
...e.attributes
|
|
1280
|
+
},
|
|
1281
|
+
sampled: a
|
|
1282
|
+
});
|
|
1283
|
+
return u !== void 0 && c.setAttribute(yt, u), s && s.emit("spanStart", c), c;
|
|
1284
|
+
}
|
|
1285
|
+
function Ae(e, t, n) {
|
|
1286
|
+
const { spanId: s, traceId: r } = e.spanContext(), i = t.getScopeData().sdkProcessingMetadata[Ot] ? !1 : k(e), o = i ? new X({
|
|
1287
|
+
...n,
|
|
1288
|
+
parentSpanId: s,
|
|
1289
|
+
traceId: r,
|
|
1290
|
+
sampled: i
|
|
1291
|
+
}) : new J({ traceId: r });
|
|
1292
|
+
It(e, o);
|
|
1293
|
+
const a = g();
|
|
1294
|
+
return a && (a.emit("spanStart", o), n.endTimestamp && a.emit("spanEnd", o)), o;
|
|
1295
|
+
}
|
|
1296
|
+
function Ne(e) {
|
|
1297
|
+
const t = M(e);
|
|
1298
|
+
if (!t)
|
|
1299
|
+
return;
|
|
1300
|
+
const n = g();
|
|
1301
|
+
return (n ? n.getOptions() : {}).parentSpanIsAlwaysRootSpan ? y(t) : t;
|
|
1302
|
+
}
|
|
1303
|
+
function Re(e) {
|
|
1304
|
+
if (e)
|
|
1305
|
+
return Ce(e) ? { captureContext: e } : we(e) ? {
|
|
1306
|
+
captureContext: e
|
|
1307
|
+
} : e;
|
|
1308
|
+
}
|
|
1309
|
+
function Ce(e) {
|
|
1310
|
+
return e instanceof I || typeof e == "function";
|
|
1311
|
+
}
|
|
1312
|
+
const Oe = [
|
|
1313
|
+
"user",
|
|
1314
|
+
"level",
|
|
1315
|
+
"extra",
|
|
1316
|
+
"contexts",
|
|
1317
|
+
"tags",
|
|
1318
|
+
"fingerprint",
|
|
1319
|
+
"requestSession",
|
|
1320
|
+
"propagationContext"
|
|
1321
|
+
];
|
|
1322
|
+
function we(e) {
|
|
1323
|
+
return Object.keys(e).some((t) => Oe.includes(t));
|
|
1324
|
+
}
|
|
1325
|
+
function $e(e, t) {
|
|
1326
|
+
return N().captureException(e, Re(t));
|
|
1327
|
+
}
|
|
1328
|
+
const De = ["activate", "mount", "update"], ve = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, ke = /(?:^|[-_])(\w)/g, Pe = (e) => e.replace(ke, (t) => t.toUpperCase()).replace(/[-_]/g, ""), Me = "<Root>", L = "<Anonymous>", Le = (e, t) => e.repeat(t), w = (e, t) => {
|
|
1329
|
+
if (!e)
|
|
1330
|
+
return L;
|
|
1331
|
+
if (e.$root === e)
|
|
1332
|
+
return Me;
|
|
1333
|
+
if (!e.$options)
|
|
1334
|
+
return L;
|
|
1335
|
+
const n = e.$options;
|
|
1336
|
+
let s = n.name || n._componentTag;
|
|
1337
|
+
const r = n.__file;
|
|
1338
|
+
if (!s && r) {
|
|
1339
|
+
const i = r.match(/([^/\\]+)\.vue$/);
|
|
1340
|
+
i && (s = i[1]);
|
|
1341
|
+
}
|
|
1342
|
+
return (s ? `<${Pe(s)}>` : L) + (r && t !== !1 ? ` at ${r}` : "");
|
|
1343
|
+
}, xe = (e) => {
|
|
1344
|
+
if (e && (e._isVue || e.__isVue) && e.$parent) {
|
|
1345
|
+
const t = [];
|
|
1346
|
+
let n = 0;
|
|
1347
|
+
for (; e; ) {
|
|
1348
|
+
if (t.length > 0) {
|
|
1349
|
+
const r = t[t.length - 1];
|
|
1350
|
+
if (r.constructor === e.constructor) {
|
|
1351
|
+
n++, e = e.$parent;
|
|
1352
|
+
continue;
|
|
1353
|
+
} else n > 0 && (t[t.length - 1] = [r, n], n = 0);
|
|
1354
|
+
}
|
|
1355
|
+
t.push(e), e = e.$parent;
|
|
1356
|
+
}
|
|
1357
|
+
return `
|
|
1358
|
+
|
|
1359
|
+
found in
|
|
1360
|
+
|
|
1361
|
+
${t.map(
|
|
1362
|
+
(r, i) => `${(i === 0 ? "---> " : Le(" ", 5 + i * 2)) + (Array.isArray(r) ? `${w(r[0])}... (${r[1]} recursive calls)` : w(r))}`
|
|
1363
|
+
).join(`
|
|
1364
|
+
`)}`;
|
|
1365
|
+
}
|
|
1366
|
+
return `
|
|
1367
|
+
|
|
1368
|
+
(found in ${w(e)})`;
|
|
1369
|
+
}, Ue = (e, t) => {
|
|
1370
|
+
const { errorHandler: n, warnHandler: s, silent: r } = e.config;
|
|
1371
|
+
e.config.errorHandler = (i, o, a) => {
|
|
1372
|
+
const u = w(o, !1), c = o ? xe(o) : "", d = {
|
|
1373
|
+
componentName: u,
|
|
1374
|
+
lifecycleHook: a,
|
|
1375
|
+
trace: c
|
|
1376
|
+
};
|
|
1377
|
+
if (t.attachProps && o && (o.$options && o.$options.propsData ? d.propsData = o.$options.propsData : o.$props && (d.propsData = o.$props)), setTimeout(() => {
|
|
1378
|
+
$e(i, {
|
|
1379
|
+
captureContext: { contexts: { vue: d } },
|
|
1380
|
+
mechanism: { handled: !1 }
|
|
1381
|
+
});
|
|
1382
|
+
}), typeof n == "function" && n.call(e, i, o, a), t.logErrors) {
|
|
1383
|
+
const p = typeof console < "u", m = `Error in ${a}: "${i && i.toString()}"`;
|
|
1384
|
+
s ? s.call(null, m, o, c) : p && !r && lt(() => {
|
|
1385
|
+
console.error(`[Vue warn]: ${m}${c}`);
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
}, dt = "ui.vue", Be = {
|
|
1390
|
+
activate: ["activated", "deactivated"],
|
|
1391
|
+
create: ["beforeCreate", "created"],
|
|
1392
|
+
// Vue 3
|
|
1393
|
+
unmount: ["beforeUnmount", "unmounted"],
|
|
1394
|
+
// Vue 2
|
|
1395
|
+
destroy: ["beforeDestroy", "destroyed"],
|
|
1396
|
+
mount: ["beforeMount", "mounted"],
|
|
1397
|
+
update: ["beforeUpdate", "updated"]
|
|
1398
|
+
};
|
|
1399
|
+
function Fe(e, t, n) {
|
|
1400
|
+
e.$_sentryRootSpanTimer && clearTimeout(e.$_sentryRootSpanTimer), e.$_sentryRootSpanTimer = setTimeout(() => {
|
|
1401
|
+
e.$root && e.$root.$_sentryRootSpan && (e.$root.$_sentryRootSpan.end(t), e.$root.$_sentryRootSpan = void 0);
|
|
1402
|
+
}, n);
|
|
1403
|
+
}
|
|
1404
|
+
const Ye = (e) => {
|
|
1405
|
+
const t = (e.hooks || []).concat(De).filter((s, r, i) => i.indexOf(s) === r), n = {};
|
|
1406
|
+
for (const s of t) {
|
|
1407
|
+
const r = Be[s];
|
|
1408
|
+
if (!r) {
|
|
1409
|
+
ve && _.warn(`Unknown hook: ${s}`);
|
|
1410
|
+
continue;
|
|
1411
|
+
}
|
|
1412
|
+
for (const i of r)
|
|
1413
|
+
n[i] = function() {
|
|
1414
|
+
const o = this.$root === this;
|
|
1415
|
+
o && et() && (this.$_sentryRootSpan = this.$_sentryRootSpan || ct({
|
|
1416
|
+
name: "Application Render",
|
|
1417
|
+
op: `${dt}.render`,
|
|
1418
|
+
attributes: {
|
|
1419
|
+
[D]: "auto.ui.vue"
|
|
1420
|
+
}
|
|
1421
|
+
}));
|
|
1422
|
+
const a = w(this, !1), u = Array.isArray(e.trackComponents) ? e.trackComponents.indexOf(a) > -1 : e.trackComponents;
|
|
1423
|
+
if (!(!o && !u))
|
|
1424
|
+
if (this.$_sentrySpans = this.$_sentrySpans || {}, i == r[0]) {
|
|
1425
|
+
if (this.$root && this.$root.$_sentryRootSpan || et()) {
|
|
1426
|
+
const d = this.$_sentrySpans[s];
|
|
1427
|
+
d && d.end(), this.$_sentrySpans[s] = ct({
|
|
1428
|
+
name: `Vue <${a}>`,
|
|
1429
|
+
op: `${dt}.${s}`,
|
|
1430
|
+
attributes: {
|
|
1431
|
+
[D]: "auto.ui.vue"
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
} else {
|
|
1436
|
+
const c = this.$_sentrySpans[s];
|
|
1437
|
+
if (!c) return;
|
|
1438
|
+
c.end(), Fe(this, $(), e.timeout);
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
return n;
|
|
1443
|
+
};
|
|
1444
|
+
function Ge(e) {
|
|
1445
|
+
e.mixin(Ye({
|
|
1446
|
+
trackComponents: !1
|
|
1447
|
+
})), Ue(e);
|
|
1448
|
+
}
|
|
1449
|
+
export {
|
|
1450
|
+
Ge as c
|
|
1451
|
+
};
|
|
1452
|
+
//# sourceMappingURL=sentry-D-KvzqAy.js.map
|