@crimson-education/browser-logger 5.0.1-beta.3 → 5.0.1
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/README.md +127 -73
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +47 -19
- package/lib/index.js.map +1 -1
- package/lib/logger/consoleTransport.d.ts +1 -1
- package/lib/logger/consoleTransport.d.ts.map +1 -1
- package/lib/logger/consoleTransport.js +22 -16
- package/lib/logger/consoleTransport.js.map +1 -1
- package/lib/logger/datadogTransport.d.ts +1 -1
- package/lib/logger/datadogTransport.d.ts.map +1 -1
- package/lib/logger/datadogTransport.js +8 -4
- package/lib/logger/datadogTransport.js.map +1 -1
- package/lib/logger/index.js +49 -29
- package/lib/logger/index.js.map +1 -1
- package/lib/logger/index.test.js +18 -16
- package/lib/logger/index.test.js.map +1 -1
- package/lib/logger/utils.js +9 -4
- package/lib/logger/utils.js.map +1 -1
- package/lib/reporters/amplifyReporter.d.ts +86 -0
- package/lib/reporters/amplifyReporter.d.ts.map +1 -0
- package/lib/reporters/amplifyReporter.js +225 -0
- package/lib/reporters/amplifyReporter.js.map +1 -0
- package/lib/reporters/amplifyReporter.test.d.ts +2 -0
- package/lib/reporters/amplifyReporter.test.d.ts.map +1 -0
- package/lib/reporters/amplifyReporter.test.js +51 -0
- package/lib/reporters/amplifyReporter.test.js.map +1 -0
- package/lib/reporters/datadogReporter.d.ts +1 -13
- package/lib/reporters/datadogReporter.d.ts.map +1 -1
- package/lib/reporters/datadogReporter.js +49 -122
- package/lib/reporters/datadogReporter.js.map +1 -1
- package/lib/reporters/gtmReporter.d.ts +1 -1
- package/lib/reporters/gtmReporter.d.ts.map +1 -1
- package/lib/reporters/gtmReporter.js +5 -1
- package/lib/reporters/gtmReporter.js.map +1 -1
- package/lib/reporters/index.js +71 -46
- package/lib/reporters/index.js.map +1 -1
- package/lib/reporters/logReporter.js +34 -24
- package/lib/reporters/logReporter.js.map +1 -1
- package/lib/reporters/posthogReporter.d.ts +51 -0
- package/lib/reporters/posthogReporter.d.ts.map +1 -0
- package/lib/reporters/posthogReporter.js +254 -0
- package/lib/reporters/posthogReporter.js.map +1 -0
- package/lib/reporters/posthogReporter.test.d.ts +2 -0
- package/lib/reporters/posthogReporter.test.d.ts.map +1 -0
- package/lib/reporters/posthogReporter.test.js +197 -0
- package/lib/reporters/posthogReporter.test.js.map +1 -0
- package/lib/types/index.js +18 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/logger.d.ts +3 -3
- package/lib/types/logger.d.ts.map +1 -1
- package/lib/types/logger.js +5 -2
- package/lib/types/logger.js.map +1 -1
- package/lib/types/reporter.d.ts +20 -6
- package/lib/types/reporter.d.ts.map +1 -1
- package/lib/types/reporter.js +2 -1
- package/lib/utils.js +5 -1
- package/lib/utils.js.map +1 -1
- package/lib/utils.test.js +4 -2
- package/lib/utils.test.js.map +1 -1
- package/package.json +17 -11
- package/src/index.ts +11 -0
- package/src/reporters/amplifyReporter.test.ts +61 -0
- package/src/reporters/amplifyReporter.ts +344 -0
- package/src/reporters/datadogReporter.ts +22 -133
- package/src/reporters/posthogReporter.test.ts +244 -0
- package/src/reporters/posthogReporter.ts +374 -0
- package/src/types/reporter.ts +16 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const amplifyReporter_1 = require("./amplifyReporter");
|
|
4
|
+
describe('amplifyReporter', () => {
|
|
5
|
+
it('should convert all attribute values to arrays of strings', () => {
|
|
6
|
+
const testMetadata = { a: 'a', d: ['e', 'f'] };
|
|
7
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
8
|
+
expect(attributeMap.a).toEqual(['a']);
|
|
9
|
+
expect(attributeMap.d).toEqual(['e', 'f']);
|
|
10
|
+
});
|
|
11
|
+
it('should handle undefined / null attributes', () => {
|
|
12
|
+
const testMetadata = { a: null, d: undefined };
|
|
13
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
14
|
+
expect(attributeMap.a).toBeNull();
|
|
15
|
+
expect(attributeMap.d).toBeNull();
|
|
16
|
+
});
|
|
17
|
+
it('should flatten hierarchies', () => {
|
|
18
|
+
const testMetadata = { foo: { bar: 'baz' } };
|
|
19
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
20
|
+
expect(attributeMap['foo.bar']).toEqual(['baz']);
|
|
21
|
+
});
|
|
22
|
+
it('should stringify non-string array members', () => {
|
|
23
|
+
var _a;
|
|
24
|
+
const testMetadata = { foo: 5, bar: [{ baz: 'maz' }] };
|
|
25
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
26
|
+
expect(attributeMap.foo).toEqual(['5']);
|
|
27
|
+
expect(typeof ((_a = attributeMap.bar) === null || _a === void 0 ? void 0 : _a[0])).toEqual('string');
|
|
28
|
+
});
|
|
29
|
+
it('should truncate attribute names', () => {
|
|
30
|
+
const testMetadata = { thisIsAVeryVeryLongAttributeNameThatNeedsToBeTruncated: 5 };
|
|
31
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
32
|
+
expect(attributeMap.___VeryVeryLongAttributeNameThatNeedsToBeTruncated).toEqual(['5']);
|
|
33
|
+
});
|
|
34
|
+
it('should truncate attribute values', () => {
|
|
35
|
+
const testMetadata = {
|
|
36
|
+
a: 'ThisIsAVeryLongStringThatNeedsToBeTruncatedTo100CharsOrElseThereWillBeAProblemWithSendingTheBeautifulDataToPinpoint',
|
|
37
|
+
};
|
|
38
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata);
|
|
39
|
+
expect(attributeMap.a).toEqual([
|
|
40
|
+
'ThisIsAVeryLongStringThatNeedsToBeTruncatedTo100CharsOrElseThereWillBeAProblemWithSendingTheBeautifu',
|
|
41
|
+
]);
|
|
42
|
+
});
|
|
43
|
+
it('should not group values into arrays when groupValues===false', () => {
|
|
44
|
+
const testMetadata = {
|
|
45
|
+
a: '5',
|
|
46
|
+
};
|
|
47
|
+
const attributeMap = (0, amplifyReporter_1.asAttributeMap)(testMetadata, false);
|
|
48
|
+
expect(attributeMap.a).toEqual('5');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=amplifyReporter.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amplifyReporter.test.js","sourceRoot":"","sources":["../../src/reporters/amplifyReporter.test.ts"],"names":[],"mappings":";;AAAA,uDAAmD;AAEnD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAA,gCAAc,EAAC,YAAY,CAAC,CAAC;QAElD,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAA,gCAAc,EAAC,YAAY,CAAC,CAAC;QAElD,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CA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,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YAC7B,sGAAsG;SACvG,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,YAAY,GAAG;YACnB,CAAC,EAAE,GAAG;SACP,CAAC;QAEF,MAAM,YAAY,GAAG,IAAA,gCAAc,EAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzD,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -23,14 +23,11 @@ export interface DatadogReporterConfig extends ReporterConfigBase {
|
|
|
23
23
|
* @deprecated Prefer using the dedicated `logSampleRate`, `rumSampleRate`, and `replaySampleRate` options.
|
|
24
24
|
*/
|
|
25
25
|
sampleRate?: number;
|
|
26
|
-
sessionSampleRate?: number;
|
|
27
|
-
sessionReplaySampleRate?: number;
|
|
28
26
|
/**
|
|
29
27
|
* Sampling rate for browser log collection. Defaults to 100, meaning every log message is sent to Datadog.
|
|
30
28
|
*/
|
|
31
29
|
logSampleRate?: number;
|
|
32
30
|
/**
|
|
33
|
-
* @deprecated Prefer using `sessionSampleRate`.
|
|
34
31
|
* Sampling rate for RUM session collection. Defaults to 100, meaning every browser session is tracked.
|
|
35
32
|
*
|
|
36
33
|
* RUM can be used to track things like core web vitals.
|
|
@@ -39,7 +36,6 @@ export interface DatadogReporterConfig extends ReporterConfigBase {
|
|
|
39
36
|
*/
|
|
40
37
|
rumSampleRate?: number;
|
|
41
38
|
/**
|
|
42
|
-
* @deprecated Prefer using `sessionReplaySampleRate`.
|
|
43
39
|
* Applied after the RUM sample rate, and controls the percentage of sessions tracked as Browser RUM & Session Replay.
|
|
44
40
|
* It defaults to 100, so every session is tracked as Browser RUM & Session Replay by default.
|
|
45
41
|
*
|
|
@@ -51,17 +47,10 @@ export interface DatadogReporterConfig extends ReporterConfigBase {
|
|
|
51
47
|
*/
|
|
52
48
|
useSecureSessionCookie?: boolean;
|
|
53
49
|
/**
|
|
54
|
-
* @deprecated Prefer using `usePartitionedCrossSiteSessionCookie`.
|
|
55
50
|
* Use a secure cross-site session cookie.
|
|
56
51
|
* This allows the RUM Browser SDK to run when the site is loaded from another one (iframe). Implies `useSecureSessionCookie`
|
|
57
52
|
*/
|
|
58
53
|
useCrossSiteSessionCookie?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Use a partitioned secure cross-site session cookie. This allows the RUM Browser SDK to run when the site is loaded from another one (iframe). Implies `useSecureSessionCookie`.
|
|
61
|
-
* Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
usePartitionedCrossSiteSessionCookie?: boolean;
|
|
65
54
|
/**
|
|
66
55
|
* Preserve the session across subdomains for the same site.
|
|
67
56
|
*/
|
|
@@ -111,8 +100,7 @@ export interface DatadogReporterConfig extends ReporterConfigBase {
|
|
|
111
100
|
/**
|
|
112
101
|
* A list of request origins used to inject tracing headers, to be able to connect RUM and backend tracing.
|
|
113
102
|
*/
|
|
114
|
-
|
|
115
|
-
allowedTracingUrls?: (string | RegExp)[];
|
|
103
|
+
allowedTracingOrigins?: (string | RegExp)[];
|
|
116
104
|
/**
|
|
117
105
|
* Enables action tracking for user interactions. This enables the Heatmap tab within Datadog
|
|
118
106
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datadogReporter.d.ts","sourceRoot":"","sources":["../../src/reporters/datadogReporter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAMT,WAAW,EACX,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAA4B,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAc,mBAAmB,EAAE,oBAAoB,E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EG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAEhD;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAC;IACnD;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAErD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5C;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,WAAW,EAAE,CAAC;CACtC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAoI3F"}
|
|
@@ -1,141 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
FRUSTRATION_WINDOW = 5000; // Time window in ms
|
|
11
|
-
constructor(config) {
|
|
12
|
-
this.config = config;
|
|
13
|
-
if (config.trackFrustrations) {
|
|
14
|
-
this.setupFrustrationDetection();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
setupFrustrationDetection() {
|
|
18
|
-
// Track rapid clicks (potential frustration)
|
|
19
|
-
let clickCount = 0;
|
|
20
|
-
let lastClickTime = 0;
|
|
21
|
-
document.addEventListener('click', () => {
|
|
22
|
-
const now = Date.now();
|
|
23
|
-
if (now - lastClickTime < 1000) {
|
|
24
|
-
// Rapid clicks within 1 second
|
|
25
|
-
clickCount++;
|
|
26
|
-
if (clickCount >= 3) {
|
|
27
|
-
this.recordFrustrationEvent('rapid_clicks');
|
|
28
|
-
clickCount = 0;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
clickCount = 1;
|
|
33
|
-
}
|
|
34
|
-
lastClickTime = now;
|
|
35
|
-
});
|
|
36
|
-
// Track form errors (potential frustration)
|
|
37
|
-
document.addEventListener('invalid', () => {
|
|
38
|
-
this.recordFrustrationEvent('form_validation_error');
|
|
39
|
-
});
|
|
40
|
-
// Track 404 errors (potential frustration)
|
|
41
|
-
window.addEventListener('error', (event) => {
|
|
42
|
-
if (event.message.includes('404') || event.message.includes('Not Found')) {
|
|
43
|
-
this.recordFrustrationEvent('page_not_found');
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
// Track network errors (potential frustration)
|
|
47
|
-
window.addEventListener('unhandledrejection', (event) => {
|
|
48
|
-
if (event.reason && typeof event.reason === 'object' && 'status' in event.reason) {
|
|
49
|
-
const status = event.reason.status;
|
|
50
|
-
if (status >= 400) {
|
|
51
|
-
this.recordFrustrationEvent('network_error');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
recordFrustrationEvent(type) {
|
|
57
|
-
const now = Date.now();
|
|
58
|
-
this.frustrationEvents.push({ type, timestamp: now });
|
|
59
|
-
// Clean old events outside the window
|
|
60
|
-
this.frustrationEvents = this.frustrationEvents.filter((event) => now - event.timestamp < this.FRUSTRATION_WINDOW);
|
|
61
|
-
// Check if we have enough events to trigger frustration
|
|
62
|
-
if (this.frustrationEvents.length >= this.FRUSTRATION_THRESHOLD) {
|
|
63
|
-
this.triggerFrustrationDetection();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
triggerFrustrationDetection() {
|
|
67
|
-
const frustrationData = {
|
|
68
|
-
frustrationType: 'user_frustration_detected',
|
|
69
|
-
frustrationEvents: this.frustrationEvents.map((e) => e.type),
|
|
70
|
-
frustrationCount: this.frustrationEvents.length,
|
|
71
|
-
pageUrl: window.location.href,
|
|
72
|
-
timestamp: new Date().toISOString(),
|
|
73
|
-
};
|
|
74
|
-
// Send frustration event to Datadog
|
|
75
|
-
if (typeof datadogRum !== 'undefined') {
|
|
76
|
-
datadogRum.addAction('User Frustration Detected', frustrationData);
|
|
77
|
-
}
|
|
78
|
-
// Clear events after reporting
|
|
79
|
-
this.frustrationEvents = [];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export function datadogReporter(info, config) {
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.datadogReporter = void 0;
|
|
4
|
+
const browser_logs_1 = require("@datadog/browser-logs");
|
|
5
|
+
const browser_rum_1 = require("@datadog/browser-rum");
|
|
6
|
+
const logger_1 = require("../logger");
|
|
7
|
+
const datadogTransport_1 = require("../logger/datadogTransport");
|
|
8
|
+
function datadogReporter(info, config) {
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
83
10
|
const isLocalhost = window.location.hostname === 'localhost';
|
|
84
11
|
// Don't forward error logs by default, do enable the log transport by default
|
|
85
12
|
// forwardErrorsToLogs incorrectly is called forwardConsoleLogs, this is for backwards compatibility
|
|
86
|
-
const forwardErrorsToLogs = config.forwardConsoleLogs
|
|
13
|
+
const forwardErrorsToLogs = (_a = config.forwardConsoleLogs) !== null && _a !== void 0 ? _a : false;
|
|
87
14
|
const enableLogTransport = config.logTransport !== false;
|
|
88
15
|
// Only init datadog logs if something is using it.
|
|
89
|
-
if (forwardErrorsToLogs
|
|
90
|
-
datadogLogs.init({
|
|
16
|
+
if (forwardErrorsToLogs !== true && enableLogTransport !== true) {
|
|
17
|
+
browser_logs_1.datadogLogs.init({
|
|
91
18
|
site: config.site,
|
|
19
|
+
proxyUrl: config.proxyUrl,
|
|
92
20
|
clientToken: config.clientToken,
|
|
93
21
|
service: info.service,
|
|
94
22
|
env: info.environment,
|
|
95
|
-
version: config.version
|
|
23
|
+
version: (_b = config.version) !== null && _b !== void 0 ? _b : info.version,
|
|
24
|
+
sampleRate: (_d = (_c = config.logSampleRate) !== null && _c !== void 0 ? _c : config.sampleRate) !== null && _d !== void 0 ? _d : 100,
|
|
96
25
|
beforeSend: config.beforeLogsSend,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// Note: useCrossSiteSessionCookie is not available in newer Datadog versions
|
|
26
|
+
useSecureSessionCookie: (_e = config.useSecureSessionCookie) !== null && _e !== void 0 ? _e : !isLocalhost,
|
|
27
|
+
useCrossSiteSessionCookie: (_f = config.useCrossSiteSessionCookie) !== null && _f !== void 0 ? _f : false,
|
|
100
28
|
trackSessionAcrossSubdomains: config.trackSessionAcrossSubdomains,
|
|
101
29
|
forwardErrorsToLogs,
|
|
102
|
-
allowedTrackingOrigins: config.allowedTrackingOrigins,
|
|
103
30
|
});
|
|
104
|
-
datadogLogs.logger.setHandler(HandlerType.http);
|
|
31
|
+
browser_logs_1.datadogLogs.logger.setHandler(browser_logs_1.HandlerType.http);
|
|
105
32
|
}
|
|
106
33
|
// Add the datadog log transport
|
|
107
34
|
if (enableLogTransport) {
|
|
108
|
-
logTransports.push(datadogTransport(typeof config.logTransport === 'boolean' ? {} : config.logTransport));
|
|
35
|
+
logger_1.logTransports.push((0, datadogTransport_1.datadogTransport)(typeof config.logTransport === 'boolean' ? {} : config.logTransport));
|
|
109
36
|
}
|
|
110
|
-
datadogRum.init({
|
|
37
|
+
browser_rum_1.datadogRum.init({
|
|
111
38
|
enableExperimentalFeatures: ['feature_flags'],
|
|
112
39
|
site: config.site,
|
|
40
|
+
proxyUrl: config.proxyUrl,
|
|
113
41
|
clientToken: config.clientToken,
|
|
114
42
|
applicationId: config.applicationId,
|
|
115
43
|
service: info.service,
|
|
116
44
|
env: info.environment,
|
|
117
|
-
version: config.version
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// Track interactions (Note: trackFrustrations is not available in Datadog v6)
|
|
123
|
-
trackUserInteractions: config.trackUserInteractions ?? config.trackInteractions ?? false,
|
|
124
|
-
useSecureSessionCookie: config.useSecureSessionCookie ?? !isLocalhost,
|
|
125
|
-
// Note: useCrossSiteSessionCookie is not available in newer Datadog versions
|
|
45
|
+
version: (_g = config.version) !== null && _g !== void 0 ? _g : info.version,
|
|
46
|
+
sampleRate: (_j = (_h = config.rumSampleRate) !== null && _h !== void 0 ? _h : config.sampleRate) !== null && _j !== void 0 ? _j : 100,
|
|
47
|
+
replaySampleRate: (_k = config.replaySampleRate) !== null && _k !== void 0 ? _k : 100,
|
|
48
|
+
useSecureSessionCookie: (_l = config.useSecureSessionCookie) !== null && _l !== void 0 ? _l : !isLocalhost,
|
|
49
|
+
useCrossSiteSessionCookie: (_m = config.useCrossSiteSessionCookie) !== null && _m !== void 0 ? _m : false,
|
|
126
50
|
trackSessionAcrossSubdomains: config.trackSessionAcrossSubdomains,
|
|
127
|
-
|
|
128
|
-
|
|
51
|
+
trackInteractions: (_o = config.trackInteractions) !== null && _o !== void 0 ? _o : false,
|
|
52
|
+
trackFrustrations: (_p = config.trackFrustrations) !== null && _p !== void 0 ? _p : false,
|
|
53
|
+
trackViewsManually: (_q = config.trackViewsManually) !== null && _q !== void 0 ? _q : false,
|
|
54
|
+
actionNameAttribute: (_r = config.actionNameAttribute) !== null && _r !== void 0 ? _r : 'data-analytics-name',
|
|
129
55
|
beforeSend: config.beforeSend,
|
|
130
|
-
defaultPrivacyLevel: config.defaultPrivacyLevel
|
|
131
|
-
|
|
56
|
+
defaultPrivacyLevel: (_s = config.defaultPrivacyLevel) !== null && _s !== void 0 ? _s : 'mask-user-input',
|
|
57
|
+
allowedTracingOrigins: config.allowedTracingOrigins,
|
|
58
|
+
trackUserInteractions: (_t = config.trackUserInteractions) !== null && _t !== void 0 ? _t : false,
|
|
132
59
|
excludedActivityUrls: config.excludedActivityUrls,
|
|
133
60
|
});
|
|
134
|
-
// Initialize frustration detector
|
|
135
|
-
new DatadogFrustrationDetector(config);
|
|
136
61
|
const reporter = {
|
|
137
62
|
trackEvent: function (event) {
|
|
138
|
-
datadogRum.addAction(event.message, {
|
|
63
|
+
browser_rum_1.datadogRum.addAction(event.message, {
|
|
139
64
|
level: event.level,
|
|
140
65
|
...event.metadata,
|
|
141
66
|
...event.tags,
|
|
@@ -143,7 +68,7 @@ export function datadogReporter(info, config) {
|
|
|
143
68
|
});
|
|
144
69
|
},
|
|
145
70
|
addBreadcrumb: function (breadcrumb) {
|
|
146
|
-
datadogRum.addAction(breadcrumb.message, {
|
|
71
|
+
browser_rum_1.datadogRum.addAction(breadcrumb.message, {
|
|
147
72
|
...breadcrumb.metadata,
|
|
148
73
|
category: breadcrumb.category,
|
|
149
74
|
});
|
|
@@ -151,29 +76,30 @@ export function datadogReporter(info, config) {
|
|
|
151
76
|
addMetadata: function (metadata) {
|
|
152
77
|
for (const [key, value] of Object.entries(metadata)) {
|
|
153
78
|
if (value !== null) {
|
|
154
|
-
datadogRum.
|
|
79
|
+
browser_rum_1.datadogRum.addRumGlobalContext(key, value);
|
|
155
80
|
// Note, this will add duplicate context data in logs.
|
|
156
81
|
// But this is valuable for logs ingested outside of the browser logger.
|
|
157
|
-
datadogLogs.
|
|
82
|
+
browser_logs_1.datadogLogs.addLoggerGlobalContext(key, value);
|
|
158
83
|
}
|
|
159
84
|
else {
|
|
160
|
-
datadogRum.
|
|
85
|
+
browser_rum_1.datadogRum.removeRumGlobalContext(key);
|
|
161
86
|
// But this is valuable for logs ingested outside of the browser logger.
|
|
162
|
-
datadogLogs.
|
|
87
|
+
browser_logs_1.datadogLogs.removeLoggerGlobalContext(key);
|
|
163
88
|
}
|
|
164
89
|
}
|
|
165
90
|
},
|
|
166
91
|
setUser: function (user) {
|
|
92
|
+
var _a;
|
|
167
93
|
if (user) {
|
|
168
|
-
datadogRum.setUser({
|
|
94
|
+
browser_rum_1.datadogRum.setUser({
|
|
169
95
|
...user,
|
|
170
96
|
id: user.id,
|
|
171
97
|
email: user.email,
|
|
172
|
-
name: user.name
|
|
98
|
+
name: (_a = user.name) !== null && _a !== void 0 ? _a : user.email,
|
|
173
99
|
});
|
|
174
100
|
}
|
|
175
101
|
else {
|
|
176
|
-
datadogRum.
|
|
102
|
+
browser_rum_1.datadogRum.removeUser();
|
|
177
103
|
}
|
|
178
104
|
},
|
|
179
105
|
setRouteName: function (routeName) {
|
|
@@ -181,25 +107,26 @@ export function datadogReporter(info, config) {
|
|
|
181
107
|
},
|
|
182
108
|
setPageName: function (pageName) {
|
|
183
109
|
if (config.trackViewsManually) {
|
|
184
|
-
datadogRum.startView(pageName);
|
|
110
|
+
browser_rum_1.datadogRum.startView(pageName);
|
|
185
111
|
}
|
|
186
112
|
else {
|
|
187
113
|
reporter.addMetadata({ pageName });
|
|
188
114
|
}
|
|
189
115
|
},
|
|
190
116
|
reportError: function (error, metadata) {
|
|
191
|
-
datadogRum.addError(error, metadata);
|
|
117
|
+
browser_rum_1.datadogRum.addError(error, metadata);
|
|
192
118
|
},
|
|
193
119
|
reportFeatureFlag: function (flag) {
|
|
194
|
-
datadogRum.addFeatureFlagEvaluation(flag.name, flag.value);
|
|
120
|
+
browser_rum_1.datadogRum.addFeatureFlagEvaluation(flag.name, flag.value);
|
|
195
121
|
},
|
|
196
122
|
recordSession: function () {
|
|
197
|
-
datadogRum.startSessionReplayRecording();
|
|
123
|
+
browser_rum_1.datadogRum.startSessionReplayRecording();
|
|
198
124
|
},
|
|
199
125
|
recordSessionStop: function () {
|
|
200
|
-
datadogRum.stopSessionReplayRecording();
|
|
126
|
+
browser_rum_1.datadogRum.stopSessionReplayRecording();
|
|
201
127
|
},
|
|
202
128
|
};
|
|
203
129
|
return reporter;
|
|
204
130
|
}
|
|
131
|
+
exports.datadogReporter = datadogReporter;
|
|
205
132
|
//# sourceMappingURL=datadogReporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datadogReporter.js","sourceRoot":"","sources":["../../src/reporters/datadogReporter.ts"],"names":[],"mappings":"AAYA,
|
|
1
|
+
{"version":3,"file":"datadogReporter.js","sourceRoot":"","sources":["../../src/reporters/datadogReporter.ts"],"names":[],"mappings":";;;AAYA,wDAAwF;AACxF,sDAA6F;AAC7F,sCAA0C;AAC1C,iEAAyF;AAsHzF,SAAgB,eAAe,CAAC,IAAiB,EAAE,MAA6B;;IAC9E,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,WAAW,CAAC;IAE7D,8EAA8E;IAC9E,oGAAoG;IACpG,MAAM,mBAAmB,GAAG,MAAA,MAAM,CAAC,kBAAkB,mCAAI,KAAK,CAAC;IAC/D,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,KAAK,KAAK,CAAC;IAEzD,mDAAmD;IACnD,IAAI,mBAAmB,KAAK,IAAI,IAAI,kBAAkB,KAAK,IAAI,EAAE;QAC/D,0BAAW,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,EAAE,IAAI,CAAC,WAAW;YACrB,OAAO,EAAE,MAAA,MAAM,CAAC,OAAO,mCAAI,IAAI,CAAC,OAAO;YAEvC,UAAU,EAAE,MAAA,MAAA,MAAM,CAAC,aAAa,mCAAI,MAAM,CAAC,UAAU,mCAAI,GAAG;YAC5D,UAAU,EAAE,MAAM,CAAC,cAAc;YAEjC,sBAAsB,EAAE,MAAA,MAAM,CAAC,sBAAsB,mCAAI,CAAC,WAAW;YACrE,yBAAyB,EAAE,MAAA,MAAM,CAAC,yBAAyB,mCAAI,KAAK;YACpE,4BAA4B,EAAE,MAAM,CAAC,4BAA4B;YAEjE,mBAAmB;SACpB,CAAC,CAAC;QACH,0BAAW,CAAC,M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AElB,
|
|
1
|
+
{"version":3,"file":"gtmReporter.d.ts","sourceRoot":"","sources":["../../src/reporters/gtmReporter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAKT,WAAW,EACX,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,oBAAY,iBAAiB,GAAG,kBAAkB,CAAC;AAEnD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;KACnC;CACF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAuDnF"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gtmReporter = void 0;
|
|
4
|
+
function gtmReporter(info, config) {
|
|
2
5
|
let loadedDataLayer = !!window.dataLayer;
|
|
3
6
|
const baseMetadata = {
|
|
4
7
|
service: info.service,
|
|
@@ -50,4 +53,5 @@ export function gtmReporter(info, config) {
|
|
|
50
53
|
}
|
|
51
54
|
return reporter;
|
|
52
55
|
}
|
|
56
|
+
exports.gtmReporter = gtmReporter;
|
|
53
57
|
//# sourceMappingURL=gtmReporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtmReporter.js","sourceRoot":"","sources":["../../src/reporters/gtmReporter.ts"],"names":[],"mappings":"AAkBA,
|
|
1
|
+
{"version":3,"file":"gtmReporter.js","sourceRoot":"","sources":["../../src/reporters/gtmReporter.ts"],"names":[],"mappings":";;;AAkBA,SAAgB,WAAW,CAAC,IAAiB,EAAE,MAAyB;IACtE,IAAI,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;IACzC,MAAM,YAAY,GAAG;QACnB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,MAAM,EAAE,MAA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