@dxos/observability 0.5.5-main.2a3283d → 0.5.5-main.42bf734
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/lib/browser/{chunk-KRN52DNQ.mjs → chunk-5E3CR23D.mjs} +8 -5
- package/dist/lib/browser/{chunk-KRN52DNQ.mjs.map → chunk-5E3CR23D.mjs.map} +3 -3
- package/dist/lib/browser/chunk-I72ZJDDP.mjs +328 -0
- package/dist/lib/browser/chunk-I72ZJDDP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/observability-SGYNJETW.mjs +8 -0
- package/dist/lib/browser/segment/index.mjs +1 -2
- package/dist/lib/browser/segment/index.mjs.map +1 -1
- package/dist/lib/browser/sentry/index.mjs +7 -2
- package/dist/lib/node/chunk-2F4DCY4M.cjs +345 -0
- package/dist/lib/node/chunk-2F4DCY4M.cjs.map +7 -0
- package/dist/lib/node/{chunk-4RV4LMAG.cjs → chunk-NFII7GBC.cjs} +14 -11
- package/dist/lib/node/{chunk-4RV4LMAG.cjs.map → chunk-NFII7GBC.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +16 -16
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{observability-234R4TZL.cjs → observability-6KNNVT6F.cjs} +7 -7
- package/dist/lib/node/{observability-234R4TZL.cjs.map → observability-6KNNVT6F.cjs.map} +2 -2
- package/dist/lib/node/segment/index.cjs +2 -3
- package/dist/lib/node/segment/index.cjs.map +1 -1
- package/dist/lib/node/sentry/index.cjs +12 -11
- package/dist/lib/node/sentry/index.cjs.map +2 -2
- package/dist/types/src/observability.d.ts.map +1 -1
- package/dist/types/src/observability.js +5 -1
- package/dist/types/src/observability.js.map +1 -1
- package/dist/types/src/sentry/browser.d.ts +2 -1
- package/dist/types/src/sentry/browser.d.ts.map +1 -1
- package/dist/types/src/sentry/browser.js +19 -7
- package/dist/types/src/sentry/browser.js.map +1 -1
- package/dist/types/src/sentry/index.d.ts +1 -0
- package/dist/types/src/sentry/index.d.ts.map +1 -1
- package/dist/types/src/sentry/index.js +4 -0
- package/dist/types/src/sentry/index.js.map +1 -1
- package/dist/types/src/sentry/node.d.ts.map +1 -1
- package/dist/types/src/sentry/node.js +28 -6
- package/dist/types/src/sentry/node.js.map +1 -1
- package/dist/types/src/sentry/sentry-log-processor.js +4 -4
- package/dist/types/src/sentry/sentry-log-processor.js.map +1 -1
- package/dist/types/src/sentry/tracing.d.ts +5 -0
- package/dist/types/src/sentry/tracing.d.ts.map +1 -0
- package/dist/types/src/sentry/tracing.js +141 -0
- package/dist/types/src/sentry/tracing.js.map +1 -0
- package/dist/types/src/sentry/tracing.test.d.ts +2 -0
- package/dist/types/src/sentry/tracing.test.d.ts.map +1 -0
- package/dist/types/src/sentry/tracing.test.js +76 -0
- package/dist/types/src/sentry/tracing.test.js.map +1 -0
- package/package.json +19 -18
- package/src/observability.ts +4 -1
- package/src/sentry/browser.ts +7 -12
- package/src/sentry/index.ts +3 -0
- package/src/sentry/node.ts +7 -10
- package/src/sentry/sentry-log-processor.ts +1 -1
- package/src/sentry/tracing.test.ts +62 -0
- package/src/sentry/tracing.ts +153 -0
- package/dist/lib/browser/chunk-3LKCQYWD.mjs +0 -159
- package/dist/lib/browser/chunk-3LKCQYWD.mjs.map +0 -7
- package/dist/lib/browser/chunk-KDP3SESE.mjs +0 -1
- package/dist/lib/browser/observability-NTPJJQW5.mjs +0 -8
- package/dist/lib/browser/observability-NTPJJQW5.mjs.map +0 -7
- package/dist/lib/node/chunk-GIYJMZEQ.cjs +0 -2
- package/dist/lib/node/chunk-GIYJMZEQ.cjs.map +0 -7
- package/dist/lib/node/chunk-HKBUNAUG.cjs +0 -161
- package/dist/lib/node/chunk-HKBUNAUG.cjs.map +0 -7
- /package/dist/lib/browser/{chunk-KDP3SESE.mjs.map → observability-SGYNJETW.mjs.map} +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
// @dxos/test platform=browser
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const async_1 = require("@dxos/async");
|
|
32
|
+
const log_1 = require("@dxos/log");
|
|
33
|
+
const test_1 = require("@dxos/test");
|
|
34
|
+
const Sentry = __importStar(require("./browser"));
|
|
35
|
+
const Tracing = __importStar(require("./tracing"));
|
|
36
|
+
const testing_1 = require("../testing");
|
|
37
|
+
const { testkit, sentryTransport } = (0, testing_1.sentryTestkit)();
|
|
38
|
+
// TODO(burdon): https://example.com?
|
|
39
|
+
const MOCK_DESTINATION = 'https://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001';
|
|
40
|
+
(0, test_1.describe)('Logger tracing', () => {
|
|
41
|
+
(0, test_1.beforeAll)(() => {
|
|
42
|
+
Sentry.init({
|
|
43
|
+
destination: MOCK_DESTINATION,
|
|
44
|
+
release: 'test',
|
|
45
|
+
scrubFilenames: true,
|
|
46
|
+
tracing: true,
|
|
47
|
+
transport: sentryTransport,
|
|
48
|
+
});
|
|
49
|
+
Tracing.configureTracing();
|
|
50
|
+
});
|
|
51
|
+
(0, test_1.afterAll)(() => {
|
|
52
|
+
Tracing.finish();
|
|
53
|
+
});
|
|
54
|
+
(0, test_1.test)('begin and end span', async () => {
|
|
55
|
+
log_1.log.trace('test.trace', {
|
|
56
|
+
span: {
|
|
57
|
+
command: 'begin',
|
|
58
|
+
id: 'test',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
log_1.log.trace('test.trace', {
|
|
62
|
+
span: {
|
|
63
|
+
command: 'end',
|
|
64
|
+
id: 'test',
|
|
65
|
+
status: 'error',
|
|
66
|
+
},
|
|
67
|
+
error: new Error('test'),
|
|
68
|
+
});
|
|
69
|
+
// Sleep to allow Sentry tracing to flush.
|
|
70
|
+
await (0, async_1.sleep)(10);
|
|
71
|
+
Tracing.finish();
|
|
72
|
+
(0, chai_1.expect)(testkit.transactions().length).to.eq(1);
|
|
73
|
+
(0, chai_1.expect)(testkit.transactions()[0].spans[0].op).to.eq('test.trace');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=tracing.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracing.test.js","sourceRoot":"","sources":["../../../../src/sentry/tracing.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,8BAA8B;AAE9B,+BAA8B;AAE9B,uCAAoC;AACpC,mCAAgC;AAChC,qCAAiE;AAEjE,kDAAoC;AACpC,mDAAqC;AACrC,wCAA2C;AAE3C,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAA,uBAAa,GAAE,CAAC;AAErD,qCAAqC;AACrC,MAAM,gBAAgB,GAAG,2DAA2D,CAAC;AAErF,IAAA,eAAQ,EAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,IAAA,gBAAS,EAAC,GAAG,EAAE;QACb,MAAM,CAAC,IAAI,CAAC;YACV,WAAW,EAAE,gBAAgB;YAC7B,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,IAAI;YACpB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,eAAe;SAC3B,CAAC,CAAC;QAEH,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,IAAA,eAAQ,EAAC,GAAG,EAAE;QACZ,OAAO,CAAC,MAAM,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,IAAA,WAAI,EAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QACpC,SAAG,CAAC,KAAK,CAAC,YAAY,EAAE;YACtB,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO;gBAChB,EAAE,EAAE,MAAM;aACX;SACF,CAAC,CAAC;QAEH,SAAG,CAAC,KAAK,CAAC,YAAY,EAAE;YACtB,IAAI,EAAE;gBACJ,OAAO,EAAE,KAAK;gBACd,EAAE,EAAE,MAAM;gBACV,MAAM,EAAE,OAAO;aAChB;YACD,KAAK,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC;SACzB,CAAC,CAAC;QACH,0CAA0C;QAC1C,MAAM,IAAA,aAAK,EAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,IAAA,aAAM,EAAC,OAAO,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,IAAA,aAAM,EAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/observability",
|
|
3
|
-
"version": "0.5.5-main.
|
|
3
|
+
"version": "0.5.5-main.42bf734",
|
|
4
4
|
"description": "Provides a common interface for app and platform observability",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -60,30 +60,31 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@segment/analytics-node": "^2.1.0",
|
|
62
62
|
"@segment/snippet": "^4.15.3",
|
|
63
|
-
"@sentry/browser": "^
|
|
64
|
-
"@sentry/
|
|
63
|
+
"@sentry/browser": "^7.100.1",
|
|
64
|
+
"@sentry/integrations": "7.100.1",
|
|
65
|
+
"@sentry/node": "^7.100.1",
|
|
66
|
+
"@sentry/tracing": "^7.100.1",
|
|
65
67
|
"datadog-metrics": "^0.11.1",
|
|
66
68
|
"debug": "^4.3.4",
|
|
67
69
|
"js-yaml": "^4.1.0",
|
|
68
70
|
"localforage": "^1.10.0",
|
|
69
71
|
"uuid": "^8.3.2",
|
|
70
|
-
"@dxos/async": "0.5.5-main.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/node-std": "0.5.5-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/util": "0.5.5-main.2a3283d"
|
|
72
|
+
"@dxos/async": "0.5.5-main.42bf734",
|
|
73
|
+
"@dxos/client-protocol": "0.5.5-main.42bf734",
|
|
74
|
+
"@dxos/client-services": "0.5.5-main.42bf734",
|
|
75
|
+
"@dxos/config": "0.5.5-main.42bf734",
|
|
76
|
+
"@dxos/context": "0.5.5-main.42bf734",
|
|
77
|
+
"@dxos/debug": "0.5.5-main.42bf734",
|
|
78
|
+
"@dxos/log": "0.5.5-main.42bf734",
|
|
79
|
+
"@dxos/invariant": "0.5.5-main.42bf734",
|
|
80
|
+
"@dxos/network-manager": "0.5.5-main.42bf734",
|
|
81
|
+
"@dxos/node-std": "0.5.5-main.42bf734",
|
|
82
|
+
"@dxos/react-client": "0.5.5-main.42bf734",
|
|
83
|
+
"@dxos/protocols": "0.5.5-main.42bf734",
|
|
84
|
+
"@dxos/util": "0.5.5-main.42bf734"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
86
|
-
"@sentry/types": "^
|
|
87
|
+
"@sentry/types": "^7.100.1",
|
|
87
88
|
"@types/debug": "^4.1.10",
|
|
88
89
|
"@types/js-yaml": "^4.0.5",
|
|
89
90
|
"sentry-testkit": "^5.0.5"
|
package/src/observability.ts
CHANGED
|
@@ -451,7 +451,7 @@ export class Observability {
|
|
|
451
451
|
|
|
452
452
|
private async _initErrorLogs() {
|
|
453
453
|
if (this._secrets.SENTRY_DESTINATION && this._mode !== 'disabled') {
|
|
454
|
-
const { captureException, captureUserFeedback, init, setTag } = await import('./sentry');
|
|
454
|
+
const { captureException, configureTracing, captureUserFeedback, init, setTag } = await import('./sentry');
|
|
455
455
|
this._captureException = captureException;
|
|
456
456
|
this._captureUserFeedback = captureUserFeedback;
|
|
457
457
|
|
|
@@ -470,6 +470,9 @@ export class Observability {
|
|
|
470
470
|
scrubFilenames: this._mode !== 'full',
|
|
471
471
|
onError: (event) => logProcessor.addLogBreadcrumbsTo(event),
|
|
472
472
|
});
|
|
473
|
+
if (this._errorReportingOptions?.tracing) {
|
|
474
|
+
configureTracing();
|
|
475
|
+
}
|
|
473
476
|
|
|
474
477
|
// TODO(nf): set platform at instantiation? needed for node.
|
|
475
478
|
log.runtimeConfig.processors.push(logProcessor.logProcessor);
|
package/src/sentry/browser.ts
CHANGED
|
@@ -10,20 +10,20 @@ import {
|
|
|
10
10
|
captureMessage as naturalCaptureMessage,
|
|
11
11
|
sendFeedback as naturalSendFeedback,
|
|
12
12
|
withScope as naturalWithScope,
|
|
13
|
+
BrowserTracing,
|
|
14
|
+
replayIntegration,
|
|
13
15
|
breadcrumbsIntegration,
|
|
14
|
-
browserTracingIntegration,
|
|
15
16
|
feedbackIntegration,
|
|
16
|
-
httpClientIntegration,
|
|
17
|
-
replayIntegration,
|
|
18
|
-
metrics,
|
|
19
|
-
startInactiveSpan,
|
|
20
17
|
} from '@sentry/browser';
|
|
18
|
+
import { httpClientIntegration } from '@sentry/integrations';
|
|
21
19
|
|
|
22
20
|
import { log } from '@dxos/log';
|
|
23
|
-
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
24
21
|
|
|
25
22
|
import { type InitOptions } from './types';
|
|
26
23
|
|
|
24
|
+
// Browser only feature.
|
|
25
|
+
export * from './tracing';
|
|
26
|
+
|
|
27
27
|
// Polyfill export.
|
|
28
28
|
export { setTag, setTags, setUser } from '@sentry/browser';
|
|
29
29
|
|
|
@@ -45,7 +45,7 @@ export const init = (options: InitOptions) => {
|
|
|
45
45
|
breadcrumbsIntegration({ console: false, fetch: false }),
|
|
46
46
|
httpClientIntegration({ failedRequestStatusCodes: [[400, 599]] }),
|
|
47
47
|
feedbackIntegration({ autoInject: false }),
|
|
48
|
-
...(options.tracing ? [
|
|
48
|
+
...(options.tracing ? [new BrowserTracing()] : []),
|
|
49
49
|
...(options.replay ? [replayIntegration({ blockAllMedia: true, maskAllText: true })] : []),
|
|
50
50
|
],
|
|
51
51
|
replaysSessionSampleRate: options.replaySampleRate,
|
|
@@ -58,11 +58,6 @@ export const init = (options: InitOptions) => {
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);
|
|
62
|
-
TRACE_PROCESSOR.remoteTracing.registerProcessor({
|
|
63
|
-
startSpan: startInactiveSpan,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
61
|
Object.entries(options.properties ?? {}).forEach(([key, value]) => {
|
|
67
62
|
setTag(key, value);
|
|
68
63
|
});
|
package/src/sentry/index.ts
CHANGED
package/src/sentry/node.ts
CHANGED
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { captureConsoleIntegration } from '@sentry/integrations';
|
|
5
6
|
import {
|
|
6
|
-
type Event,
|
|
7
7
|
init as naturalInit,
|
|
8
8
|
setTag,
|
|
9
9
|
addBreadcrumb as naturalAddBreadcrumb,
|
|
10
10
|
captureException as naturalCaptureException,
|
|
11
11
|
captureMessage as naturalCaptureMessage,
|
|
12
12
|
withScope as naturalWithScope,
|
|
13
|
-
metrics,
|
|
14
|
-
startInactiveSpan,
|
|
15
13
|
} from '@sentry/node';
|
|
14
|
+
import type { Event } from '@sentry/node';
|
|
16
15
|
|
|
17
16
|
import { log } from '@dxos/log';
|
|
18
|
-
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
19
17
|
|
|
20
18
|
import { type InitOptions } from './types';
|
|
21
19
|
|
|
@@ -30,13 +28,17 @@ export { setTag, setTags, setUser } from '@sentry/node';
|
|
|
30
28
|
*/
|
|
31
29
|
export const init = (options: InitOptions) => {
|
|
32
30
|
try {
|
|
31
|
+
if (options.tracing) {
|
|
32
|
+
void import('@sentry/tracing');
|
|
33
|
+
}
|
|
34
|
+
|
|
33
35
|
naturalInit({
|
|
34
36
|
enabled: options.enable ?? true,
|
|
35
37
|
dsn: options.destination,
|
|
36
38
|
serverName: options.installationId,
|
|
37
39
|
release: options.release,
|
|
38
40
|
environment: options.environment ?? process.env.DX_ENVIRONMENT,
|
|
39
|
-
integrations: [],
|
|
41
|
+
integrations: [captureConsoleIntegration({ levels: ['error', 'warn'] })],
|
|
40
42
|
tracesSampleRate: options.sampleRate,
|
|
41
43
|
transport: options.transport,
|
|
42
44
|
beforeSend: (event) => {
|
|
@@ -47,11 +49,6 @@ export const init = (options: InitOptions) => {
|
|
|
47
49
|
},
|
|
48
50
|
});
|
|
49
51
|
|
|
50
|
-
TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);
|
|
51
|
-
TRACE_PROCESSOR.remoteTracing.registerProcessor({
|
|
52
|
-
startSpan: startInactiveSpan,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
52
|
Object.entries(options.properties ?? {}).forEach(([key, value]) => {
|
|
56
53
|
setTag(key, value);
|
|
57
54
|
});
|
|
@@ -7,7 +7,7 @@ import type { Breadcrumb, SeverityLevel, Event } from '@sentry/types';
|
|
|
7
7
|
import { type LogConfig, type LogEntry, LogLevel, type LogProcessor, shouldLog } from '@dxos/log';
|
|
8
8
|
import { CircularBuffer, getDebugName } from '@dxos/util';
|
|
9
9
|
|
|
10
|
-
import { withScope, captureException, captureMessage } from './
|
|
10
|
+
import { withScope, captureException, captureMessage } from './';
|
|
11
11
|
|
|
12
12
|
const MAX_LOG_BREADCRUMBS = 80;
|
|
13
13
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @dxos/test platform=browser
|
|
6
|
+
|
|
7
|
+
import { expect } from 'chai';
|
|
8
|
+
|
|
9
|
+
import { sleep } from '@dxos/async';
|
|
10
|
+
import { log } from '@dxos/log';
|
|
11
|
+
import { afterAll, beforeAll, describe, test } from '@dxos/test';
|
|
12
|
+
|
|
13
|
+
import * as Sentry from './browser';
|
|
14
|
+
import * as Tracing from './tracing';
|
|
15
|
+
import { sentryTestkit } from '../testing';
|
|
16
|
+
|
|
17
|
+
const { testkit, sentryTransport } = sentryTestkit();
|
|
18
|
+
|
|
19
|
+
// TODO(burdon): https://example.com?
|
|
20
|
+
const MOCK_DESTINATION = 'https://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001';
|
|
21
|
+
|
|
22
|
+
describe('Logger tracing', () => {
|
|
23
|
+
beforeAll(() => {
|
|
24
|
+
Sentry.init({
|
|
25
|
+
destination: MOCK_DESTINATION,
|
|
26
|
+
release: 'test',
|
|
27
|
+
scrubFilenames: true,
|
|
28
|
+
tracing: true,
|
|
29
|
+
transport: sentryTransport,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
Tracing.configureTracing();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
afterAll(() => {
|
|
36
|
+
Tracing.finish();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('begin and end span', async () => {
|
|
40
|
+
log.trace('test.trace', {
|
|
41
|
+
span: {
|
|
42
|
+
command: 'begin',
|
|
43
|
+
id: 'test',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
log.trace('test.trace', {
|
|
48
|
+
span: {
|
|
49
|
+
command: 'end',
|
|
50
|
+
id: 'test',
|
|
51
|
+
status: 'error',
|
|
52
|
+
},
|
|
53
|
+
error: new Error('test'),
|
|
54
|
+
});
|
|
55
|
+
// Sleep to allow Sentry tracing to flush.
|
|
56
|
+
await sleep(10);
|
|
57
|
+
Tracing.finish();
|
|
58
|
+
|
|
59
|
+
expect(testkit.transactions().length).to.eq(1);
|
|
60
|
+
expect(testkit.transactions()[0].spans[0].op).to.eq('test.trace');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// NOTE: Browser only API. There is no node polyfill.
|
|
6
|
+
|
|
7
|
+
import { getCurrentHub } from '@sentry/browser';
|
|
8
|
+
import { type Transaction, type Span } from '@sentry/types';
|
|
9
|
+
|
|
10
|
+
import { runInContext, scheduleMicroTask, Trigger } from '@dxos/async';
|
|
11
|
+
import { Context } from '@dxos/context';
|
|
12
|
+
import { invariant } from '@dxos/invariant';
|
|
13
|
+
import { getContextFromEntry, log, LogLevel, type LogProcessor } from '@dxos/log';
|
|
14
|
+
|
|
15
|
+
const REPORT_SPANS = false;
|
|
16
|
+
|
|
17
|
+
let TX!: Transaction;
|
|
18
|
+
const SPAN_MAP = new Map<string, Span>();
|
|
19
|
+
const SENTRY_INITIALIZED = new Trigger();
|
|
20
|
+
const ctx = new Context({ onError: (err) => log.warn('Unhandled error in Sentry context', err) });
|
|
21
|
+
ctx.maxSafeDisposeCallbacks = 10_000;
|
|
22
|
+
|
|
23
|
+
let tracingConfigured = false;
|
|
24
|
+
|
|
25
|
+
export const configureTracing = () => {
|
|
26
|
+
tracingConfigured = true;
|
|
27
|
+
runInContext(ctx, () => {
|
|
28
|
+
// Configure root transaction.
|
|
29
|
+
TX = getCurrentHub().startTransaction({
|
|
30
|
+
name: 'DXOS Core Tracing',
|
|
31
|
+
op: 'dxos',
|
|
32
|
+
});
|
|
33
|
+
invariant(TX, 'Failed to create trace');
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
|
+
window.addEventListener('beforeunload', () => {
|
|
36
|
+
finish();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (typeof process !== 'undefined') {
|
|
40
|
+
process.on('exit', () => {
|
|
41
|
+
finish();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
SENTRY_INITIALIZED.wake();
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const finish = () => {
|
|
50
|
+
for (const span of Array.from(SPAN_MAP.values()).reverse()) {
|
|
51
|
+
try {
|
|
52
|
+
span.finish();
|
|
53
|
+
} catch (err) {
|
|
54
|
+
log.warn('Failed to finish span', err);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
TX.finish();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const SENTRY_PROCESSOR: LogProcessor = (config, entry) => {
|
|
61
|
+
if (!tracingConfigured) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const { message, level, error } = entry;
|
|
66
|
+
const context = getContextFromEntry(entry);
|
|
67
|
+
|
|
68
|
+
if (level !== LogLevel.TRACE) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// NOTE: Make sure `entry` is not captured in this closure to avoid a memory leak.
|
|
73
|
+
scheduleMicroTask(ctx, async () => {
|
|
74
|
+
await SENTRY_INITIALIZED.wait();
|
|
75
|
+
|
|
76
|
+
if (REPORT_SPANS && context?.span) {
|
|
77
|
+
switch (context.span.command) {
|
|
78
|
+
case 'begin': {
|
|
79
|
+
const id = context.span.id;
|
|
80
|
+
|
|
81
|
+
if (!id || SPAN_MAP.has(id)) {
|
|
82
|
+
log.warn('Cannot begin span', id);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
let parentSpan: Span = TX;
|
|
87
|
+
if (context.span.parent) {
|
|
88
|
+
parentSpan = SPAN_MAP.get(context.span.parent) ?? TX;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let logContext: string;
|
|
92
|
+
try {
|
|
93
|
+
logContext = JSON.stringify({ ...context, message, level, error });
|
|
94
|
+
} catch (err) {
|
|
95
|
+
logContext = JSON.stringify(context);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const span = parentSpan.startChild({
|
|
99
|
+
op: message,
|
|
100
|
+
data: {
|
|
101
|
+
...context.span.data,
|
|
102
|
+
'@dxos/log': logContext,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
SPAN_MAP.set(context.span.id, span);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
case 'end': {
|
|
110
|
+
const span = SPAN_MAP.get(context.span.id);
|
|
111
|
+
if (span) {
|
|
112
|
+
span.setStatus(getSpanStatus(context.span.status));
|
|
113
|
+
context.span.data && Object.entries(context.span.data).forEach(([key, value]) => span.setData(key, value));
|
|
114
|
+
span.finish();
|
|
115
|
+
SPAN_MAP.delete(context.span.id);
|
|
116
|
+
} else {
|
|
117
|
+
log.warn('Cannot end span', context.span.id);
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
case 'update': {
|
|
123
|
+
const span = SPAN_MAP.get(context.span.id);
|
|
124
|
+
if (span) {
|
|
125
|
+
context.span.data && Object.entries(context.span.data).forEach(([key, value]) => span.setData(key, value));
|
|
126
|
+
} else {
|
|
127
|
+
log.warn('Cannot update span', context.span.id);
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
default: {
|
|
133
|
+
log.warn('Unknown span command', context.span.command);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
log.runtimeConfig.processors.push(SENTRY_PROCESSOR);
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @see https://develop.sentry.dev/sdk/event-payloads/span/#:~:text=this%20value%20explicitly.-,status,-Optional.%20Describes%20the
|
|
144
|
+
*/
|
|
145
|
+
const getSpanStatus = (status?: 'ok' | 'error') => {
|
|
146
|
+
switch (status) {
|
|
147
|
+
case 'ok':
|
|
148
|
+
return 'ok';
|
|
149
|
+
case 'error':
|
|
150
|
+
return 'not_found';
|
|
151
|
+
}
|
|
152
|
+
return status ?? 'ok';
|
|
153
|
+
};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// packages/sdk/observability/src/sentry/browser.ts
|
|
2
|
-
import { init as naturalInit, setTag, addBreadcrumb as naturalAddBreadcrumb, captureException as naturalCaptureException, captureMessage as naturalCaptureMessage, sendFeedback as naturalSendFeedback, withScope as naturalWithScope, breadcrumbsIntegration, browserTracingIntegration, feedbackIntegration, httpClientIntegration, replayIntegration, metrics, startInactiveSpan } from "@sentry/browser";
|
|
3
|
-
import { log } from "@dxos/log";
|
|
4
|
-
import { TRACE_PROCESSOR } from "@dxos/tracing";
|
|
5
|
-
import { setTag as setTag2, setTags, setUser } from "@sentry/browser";
|
|
6
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/observability/src/sentry/browser.ts";
|
|
7
|
-
var init = (options) => {
|
|
8
|
-
try {
|
|
9
|
-
log("sentry init", options, {
|
|
10
|
-
F: __dxlog_file,
|
|
11
|
-
L: 38,
|
|
12
|
-
S: void 0,
|
|
13
|
-
C: (f, a) => f(...a)
|
|
14
|
-
});
|
|
15
|
-
naturalInit({
|
|
16
|
-
enabled: options.enable ?? true,
|
|
17
|
-
dsn: options.destination,
|
|
18
|
-
release: options.release,
|
|
19
|
-
environment: options.environment,
|
|
20
|
-
integrations: [
|
|
21
|
-
breadcrumbsIntegration({
|
|
22
|
-
console: false,
|
|
23
|
-
fetch: false
|
|
24
|
-
}),
|
|
25
|
-
httpClientIntegration({
|
|
26
|
-
failedRequestStatusCodes: [
|
|
27
|
-
[
|
|
28
|
-
400,
|
|
29
|
-
599
|
|
30
|
-
]
|
|
31
|
-
]
|
|
32
|
-
}),
|
|
33
|
-
feedbackIntegration({
|
|
34
|
-
autoInject: false
|
|
35
|
-
}),
|
|
36
|
-
...options.tracing ? [
|
|
37
|
-
browserTracingIntegration()
|
|
38
|
-
] : [],
|
|
39
|
-
...options.replay ? [
|
|
40
|
-
replayIntegration({
|
|
41
|
-
blockAllMedia: true,
|
|
42
|
-
maskAllText: true
|
|
43
|
-
})
|
|
44
|
-
] : []
|
|
45
|
-
],
|
|
46
|
-
replaysSessionSampleRate: options.replaySampleRate,
|
|
47
|
-
replaysOnErrorSampleRate: options.replaySampleRateOnError,
|
|
48
|
-
tracesSampleRate: options.sampleRate,
|
|
49
|
-
transport: options.transport,
|
|
50
|
-
beforeSend: (event) => {
|
|
51
|
-
options.onError?.(event);
|
|
52
|
-
return event;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);
|
|
56
|
-
TRACE_PROCESSOR.remoteTracing.registerProcessor({
|
|
57
|
-
startSpan: startInactiveSpan
|
|
58
|
-
});
|
|
59
|
-
Object.entries(options.properties ?? {}).forEach(([key, value]) => {
|
|
60
|
-
setTag(key, value);
|
|
61
|
-
});
|
|
62
|
-
} catch (err) {
|
|
63
|
-
log.catch("Failed to initialize sentry", err, {
|
|
64
|
-
F: __dxlog_file,
|
|
65
|
-
L: 70,
|
|
66
|
-
S: void 0,
|
|
67
|
-
C: (f, a) => f(...a)
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var addBreadcrumb = (breadcrumb) => {
|
|
72
|
-
try {
|
|
73
|
-
naturalAddBreadcrumb(breadcrumb);
|
|
74
|
-
log("add breadcrumb", breadcrumb, {
|
|
75
|
-
F: __dxlog_file,
|
|
76
|
-
L: 86,
|
|
77
|
-
S: void 0,
|
|
78
|
-
C: (f, a) => f(...a)
|
|
79
|
-
});
|
|
80
|
-
} catch (err) {
|
|
81
|
-
log.catch("Failed to add breadcrumb", err, {
|
|
82
|
-
F: __dxlog_file,
|
|
83
|
-
L: 88,
|
|
84
|
-
S: void 0,
|
|
85
|
-
C: (f, a) => f(...a)
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
var captureException = (exception, captureContext) => {
|
|
90
|
-
try {
|
|
91
|
-
const eventId = naturalCaptureException(exception, captureContext);
|
|
92
|
-
log("capture exception", {
|
|
93
|
-
exception,
|
|
94
|
-
eventId,
|
|
95
|
-
...captureContext
|
|
96
|
-
}, {
|
|
97
|
-
F: __dxlog_file,
|
|
98
|
-
L: 102,
|
|
99
|
-
S: void 0,
|
|
100
|
-
C: (f, a) => f(...a)
|
|
101
|
-
});
|
|
102
|
-
return eventId;
|
|
103
|
-
} catch (err) {
|
|
104
|
-
log.catch("Failed to capture exception", err, {
|
|
105
|
-
F: __dxlog_file,
|
|
106
|
-
L: 105,
|
|
107
|
-
S: void 0,
|
|
108
|
-
C: (f, a) => f(...a)
|
|
109
|
-
});
|
|
110
|
-
return "unknown";
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
var captureMessage = (exception, captureContext) => {
|
|
114
|
-
try {
|
|
115
|
-
const eventId = naturalCaptureMessage(exception, captureContext);
|
|
116
|
-
log("capture message", {
|
|
117
|
-
exception,
|
|
118
|
-
eventId,
|
|
119
|
-
captureContext
|
|
120
|
-
}, {
|
|
121
|
-
F: __dxlog_file,
|
|
122
|
-
L: 113,
|
|
123
|
-
S: void 0,
|
|
124
|
-
C: (f, a) => f(...a)
|
|
125
|
-
});
|
|
126
|
-
return eventId;
|
|
127
|
-
} catch (err) {
|
|
128
|
-
log.catch("Failed to capture message", err, {
|
|
129
|
-
F: __dxlog_file,
|
|
130
|
-
L: 116,
|
|
131
|
-
S: void 0,
|
|
132
|
-
C: (f, a) => f(...a)
|
|
133
|
-
});
|
|
134
|
-
return "unknown";
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
var captureUserFeedback = (name, email, message) => {
|
|
138
|
-
return naturalSendFeedback({
|
|
139
|
-
name,
|
|
140
|
-
email,
|
|
141
|
-
message
|
|
142
|
-
}, {
|
|
143
|
-
includeReplay: true
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
var withScope = naturalWithScope;
|
|
147
|
-
|
|
148
|
-
export {
|
|
149
|
-
init,
|
|
150
|
-
addBreadcrumb,
|
|
151
|
-
captureException,
|
|
152
|
-
captureMessage,
|
|
153
|
-
captureUserFeedback,
|
|
154
|
-
withScope,
|
|
155
|
-
setTag2 as setTag,
|
|
156
|
-
setTags,
|
|
157
|
-
setUser
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=chunk-3LKCQYWD.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/sentry/browser.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport {\n init as naturalInit,\n setTag,\n addBreadcrumb as naturalAddBreadcrumb,\n captureException as naturalCaptureException,\n captureMessage as naturalCaptureMessage,\n sendFeedback as naturalSendFeedback,\n withScope as naturalWithScope,\n breadcrumbsIntegration,\n browserTracingIntegration,\n feedbackIntegration,\n httpClientIntegration,\n replayIntegration,\n metrics,\n startInactiveSpan,\n} from '@sentry/browser';\n\nimport { log } from '@dxos/log';\nimport { TRACE_PROCESSOR } from '@dxos/tracing';\n\nimport { type InitOptions } from './types';\n\n// Polyfill export.\nexport { setTag, setTags, setUser } from '@sentry/browser';\n\n/**\n * To use this SDK, call the init function as early as possible when loading the web page.\n * To set context information or send manual events, use the provided methods.\n *\n * @param options {InitOptions}\n */\nexport const init = (options: InitOptions) => {\n try {\n log('sentry init', options);\n naturalInit({\n enabled: options.enable ?? true,\n dsn: options.destination,\n release: options.release,\n environment: options.environment,\n integrations: [\n breadcrumbsIntegration({ console: false, fetch: false }),\n httpClientIntegration({ failedRequestStatusCodes: [[400, 599]] }),\n feedbackIntegration({ autoInject: false }),\n ...(options.tracing ? [browserTracingIntegration()] : []),\n ...(options.replay ? [replayIntegration({ blockAllMedia: true, maskAllText: true })] : []),\n ],\n replaysSessionSampleRate: options.replaySampleRate,\n replaysOnErrorSampleRate: options.replaySampleRateOnError,\n tracesSampleRate: options.sampleRate,\n transport: options.transport,\n beforeSend: (event) => {\n options.onError?.(event);\n return event;\n },\n });\n\n TRACE_PROCESSOR.remoteMetrics.registerProcessor(metrics);\n TRACE_PROCESSOR.remoteTracing.registerProcessor({\n startSpan: startInactiveSpan,\n });\n\n Object.entries(options.properties ?? {}).forEach(([key, value]) => {\n setTag(key, value);\n });\n } catch (err) {\n log.catch('Failed to initialize sentry', err);\n }\n};\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.\n *\n * https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/\n *\n * @param breadcrumb — The breadcrumb to record.\n */\nexport const addBreadcrumb: typeof naturalAddBreadcrumb = (breadcrumb) => {\n try {\n naturalAddBreadcrumb(breadcrumb);\n log('add breadcrumb', breadcrumb);\n } catch (err) {\n log.catch('Failed to add breadcrumb', err);\n }\n};\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception — An exception-like object.\n * @param captureContext — Additional scope data to apply to exception event.\n * @returns — The generated eventId.\n */\nexport const captureException: typeof naturalCaptureException = (exception, captureContext) => {\n try {\n const eventId = naturalCaptureException(exception, captureContext);\n log('capture exception', { exception, eventId, ...captureContext });\n return eventId;\n } catch (err) {\n log.catch('Failed to capture exception', err);\n return 'unknown';\n }\n};\n\nexport const captureMessage: typeof naturalCaptureMessage = (exception, captureContext) => {\n try {\n const eventId = naturalCaptureMessage(exception, captureContext);\n log('capture message', { exception, eventId, captureContext });\n return eventId;\n } catch (err) {\n log.catch('Failed to capture message', err);\n return 'unknown';\n }\n};\n\nexport const captureUserFeedback = (name: string, email: string, message: string) => {\n return naturalSendFeedback({ name, email, message }, { includeReplay: true });\n};\n\nexport const withScope = naturalWithScope;\n"],
|
|
5
|
-
"mappings": ";AAIA,SACEA,QAAQC,aACRC,QACAC,iBAAiBC,sBACjBC,oBAAoBC,yBACpBC,kBAAkBC,uBAClBC,gBAAgBC,qBAChBC,aAAaC,kBACbC,wBACAC,2BACAC,qBACAC,uBACAC,mBACAC,SACAC,yBACK;AAEP,SAASC,WAAW;AACpB,SAASC,uBAAuB;AAKhC,SAASnB,UAAAA,SAAQoB,SAASC,eAAe;;AAQlC,IAAMvB,OAAO,CAACwB,YAAAA;AACnB,MAAI;AACFJ,QAAI,eAAeI,SAAAA;;;;;;AACnBvB,gBAAY;MACVwB,SAASD,QAAQE,UAAU;MAC3BC,KAAKH,QAAQI;MACbC,SAASL,QAAQK;MACjBC,aAAaN,QAAQM;MACrBC,cAAc;QACZlB,uBAAuB;UAAEmB,SAAS;UAAOC,OAAO;QAAM,CAAA;QACtDjB,sBAAsB;UAAEkB,0BAA0B;YAAC;cAAC;cAAK;;;QAAM,CAAA;QAC/DnB,oBAAoB;UAAEoB,YAAY;QAAM,CAAA;WACpCX,QAAQY,UAAU;UAACtB,0BAAAA;YAA+B,CAAA;WAClDU,QAAQa,SAAS;UAACpB,kBAAkB;YAAEqB,eAAe;YAAMC,aAAa;UAAK,CAAA;YAAM,CAAA;;MAEzFC,0BAA0BhB,QAAQiB;MAClCC,0BAA0BlB,QAAQmB;MAClCC,kBAAkBpB,QAAQqB;MAC1BC,WAAWtB,QAAQsB;MACnBC,YAAY,CAACC,UAAAA;AACXxB,gBAAQyB,UAAUD,KAAAA;AAClB,eAAOA;MACT;IACF,CAAA;AAEA3B,oBAAgB6B,cAAcC,kBAAkBjC,OAAAA;AAChDG,oBAAgB+B,cAAcD,kBAAkB;MAC9CE,WAAWlC;IACb,CAAA;AAEAmC,WAAOC,QAAQ/B,QAAQgC,cAAc,CAAC,CAAA,EAAGC,QAAQ,CAAC,CAACC,KAAKC,KAAAA,MAAM;AAC5DzD,aAAOwD,KAAKC,KAAAA;IACd,CAAA;EACF,SAASC,KAAK;AACZxC,QAAIyC,MAAM,+BAA+BD,KAAAA;;;;;;EAC3C;AACF;AAWO,IAAMzD,gBAA6C,CAAC2D,eAAAA;AACzD,MAAI;AACF1D,yBAAqB0D,UAAAA;AACrB1C,QAAI,kBAAkB0C,YAAAA;;;;;;EACxB,SAASF,KAAK;AACZxC,QAAIyC,MAAM,4BAA4BD,KAAAA;;;;;;EACxC;AACF;AASO,IAAMvD,mBAAmD,CAAC0D,WAAWC,mBAAAA;AAC1E,MAAI;AACF,UAAMC,UAAU3D,wBAAwByD,WAAWC,cAAAA;AACnD5C,QAAI,qBAAqB;MAAE2C;MAAWE;MAAS,GAAGD;IAAe,GAAA;;;;;;AACjE,WAAOC;EACT,SAASL,KAAK;AACZxC,QAAIyC,MAAM,+BAA+BD,KAAAA;;;;;;AACzC,WAAO;EACT;AACF;AAEO,IAAMrD,iBAA+C,CAACwD,WAAWC,mBAAAA;AACtE,MAAI;AACF,UAAMC,UAAUzD,sBAAsBuD,WAAWC,cAAAA;AACjD5C,QAAI,mBAAmB;MAAE2C;MAAWE;MAASD;IAAe,GAAA;;;;;;AAC5D,WAAOC;EACT,SAASL,KAAK;AACZxC,QAAIyC,MAAM,6BAA6BD,KAAAA;;;;;;AACvC,WAAO;EACT;AACF;AAEO,IAAMM,sBAAsB,CAACC,MAAcC,OAAeC,YAAAA;AAC/D,SAAO3D,oBAAoB;IAAEyD;IAAMC;IAAOC;EAAQ,GAAG;IAAEC,eAAe;EAAK,CAAA;AAC7E;AAEO,IAAM3D,YAAYC;",
|
|
6
|
-
"names": ["init", "naturalInit", "setTag", "addBreadcrumb", "naturalAddBreadcrumb", "captureException", "naturalCaptureException", "captureMessage", "naturalCaptureMessage", "sendFeedback", "naturalSendFeedback", "withScope", "naturalWithScope", "breadcrumbsIntegration", "browserTracingIntegration", "feedbackIntegration", "httpClientIntegration", "replayIntegration", "metrics", "startInactiveSpan", "log", "TRACE_PROCESSOR", "setTags", "setUser", "options", "enabled", "enable", "dsn", "destination", "release", "environment", "integrations", "console", "fetch", "failedRequestStatusCodes", "autoInject", "tracing", "replay", "blockAllMedia", "maskAllText", "replaysSessionSampleRate", "replaySampleRate", "replaysOnErrorSampleRate", "replaySampleRateOnError", "tracesSampleRate", "sampleRate", "transport", "beforeSend", "event", "onError", "remoteMetrics", "registerProcessor", "remoteTracing", "startSpan", "Object", "entries", "properties", "forEach", "key", "value", "err", "catch", "breadcrumb", "exception", "captureContext", "eventId", "captureUserFeedback", "name", "email", "message", "includeReplay"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-KDP3SESE.mjs.map
|