@newrelic/browser-agent 1.312.1 → 1.313.0-rc.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/CHANGELOG.md +16 -0
- package/dist/cjs/common/config/init-types.js +3 -2
- package/dist/cjs/common/config/init.js +10 -8
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/timing/time-keeper.js +28 -1
- package/dist/cjs/common/util/short-circuit.js +13 -0
- package/dist/cjs/common/util/submit-data.js +2 -9
- package/dist/cjs/common/v2/script-correlation.js +50 -0
- package/dist/cjs/common/v2/script-tracker.js +278 -0
- package/dist/cjs/common/{util/v2.js → v2/utils.js} +4 -4
- package/dist/cjs/common/wrap/wrap-fetch.js +2 -2
- package/dist/cjs/common/wrap/wrap-function.js +2 -2
- package/dist/cjs/common/wrap/wrap-xhr.js +2 -2
- package/dist/cjs/features/ajax/aggregate/index.js +4 -4
- package/dist/cjs/features/generic_events/aggregate/index.js +21 -2
- package/dist/cjs/features/generic_events/instrument/index.js +24 -21
- package/dist/cjs/features/jserrors/aggregate/index.js +206 -40
- package/dist/cjs/features/logging/aggregate/index.js +4 -4
- package/dist/cjs/features/metrics/instrument/index.js +1 -8
- package/dist/cjs/features/session_trace/aggregate/index.js +3 -4
- package/dist/cjs/features/session_trace/aggregate/trace/storage.js +2 -2
- package/dist/cjs/interfaces/registered-entity.js +7 -20
- package/dist/cjs/loaders/api/register-api-types.js +8 -8
- package/dist/cjs/loaders/api/register.js +57 -44
- package/dist/esm/common/config/init-types.js +3 -2
- package/dist/esm/common/config/init.js +10 -8
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/timing/time-keeper.js +28 -1
- package/dist/esm/common/util/short-circuit.js +6 -0
- package/dist/esm/common/util/submit-data.js +2 -9
- package/dist/esm/common/v2/script-correlation.js +43 -0
- package/dist/esm/common/v2/script-tracker.js +270 -0
- package/dist/esm/common/{util/v2.js → v2/utils.js} +4 -4
- package/dist/esm/common/wrap/wrap-fetch.js +1 -1
- package/dist/esm/common/wrap/wrap-function.js +1 -1
- package/dist/esm/common/wrap/wrap-xhr.js +1 -1
- package/dist/esm/features/ajax/aggregate/index.js +1 -1
- package/dist/esm/features/generic_events/aggregate/index.js +20 -1
- package/dist/esm/features/generic_events/instrument/index.js +24 -21
- package/dist/esm/features/jserrors/aggregate/index.js +205 -39
- package/dist/esm/features/logging/aggregate/index.js +1 -1
- package/dist/esm/features/metrics/instrument/index.js +2 -9
- package/dist/esm/features/session_trace/aggregate/index.js +4 -5
- package/dist/esm/features/session_trace/aggregate/trace/storage.js +2 -2
- package/dist/esm/interfaces/registered-entity.js +7 -20
- package/dist/esm/loaders/api/register-api-types.js +8 -8
- package/dist/esm/loaders/api/register.js +54 -42
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common/config/init-types.d.ts +10 -8
- package/dist/types/common/config/init-types.d.ts.map +1 -1
- package/dist/types/common/config/init.d.ts.map +1 -1
- package/dist/types/common/timing/time-keeper.d.ts.map +1 -1
- package/dist/types/common/util/short-circuit.d.ts +8 -0
- package/dist/types/common/util/short-circuit.d.ts.map +1 -0
- package/dist/types/common/util/submit-data.d.ts.map +1 -1
- package/dist/types/common/v2/script-correlation.d.ts +38 -0
- package/dist/types/common/v2/script-correlation.d.ts.map +1 -0
- package/dist/types/common/{util → v2}/script-tracker.d.ts +3 -0
- package/dist/types/common/v2/script-tracker.d.ts.map +1 -0
- package/dist/types/common/{util/v2.d.ts → v2/utils.d.ts} +1 -1
- package/dist/types/common/v2/utils.d.ts.map +1 -0
- package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/generic_events/instrument/index.d.ts +1 -1
- package/dist/types/features/generic_events/instrument/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts +25 -16
- package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/metrics/instrument/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/interfaces/registered-entity.d.ts +0 -10
- package/dist/types/interfaces/registered-entity.d.ts.map +1 -1
- package/dist/types/loaders/api/register-api-types.d.ts +15 -15
- package/dist/types/loaders/api/register-api-types.d.ts.map +1 -1
- package/dist/types/loaders/api/register.d.ts +6 -0
- package/dist/types/loaders/api/register.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common/config/init-types.js +3 -2
- package/src/common/config/init.js +6 -4
- package/src/common/timing/time-keeper.js +30 -1
- package/src/common/util/short-circuit.js +6 -0
- package/src/common/util/submit-data.js +2 -8
- package/src/common/v2/script-correlation.js +44 -0
- package/src/common/v2/script-tracker.js +260 -0
- package/src/common/{util/v2.js → v2/utils.js} +4 -4
- package/src/common/wrap/wrap-fetch.js +1 -1
- package/src/common/wrap/wrap-function.js +1 -1
- package/src/common/wrap/wrap-xhr.js +1 -1
- package/src/features/ajax/aggregate/index.js +1 -1
- package/src/features/generic_events/aggregate/index.js +20 -1
- package/src/features/generic_events/instrument/index.js +25 -22
- package/src/features/jserrors/aggregate/index.js +200 -43
- package/src/features/logging/aggregate/index.js +1 -1
- package/src/features/metrics/instrument/index.js +2 -13
- package/src/features/session_trace/aggregate/index.js +4 -6
- package/src/features/session_trace/aggregate/trace/storage.js +2 -2
- package/src/interfaces/registered-entity.js +8 -20
- package/src/loaders/api/register-api-types.js +8 -8
- package/src/loaders/api/register.js +56 -35
- package/dist/cjs/common/util/script-tracker.js +0 -204
- package/dist/esm/common/util/script-tracker.js +0 -196
- package/dist/types/common/util/script-tracker.d.ts.map +0 -1
- package/dist/types/common/util/v2.d.ts.map +0 -1
- package/src/common/util/script-tracker.js +0 -189
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { handle } from '../../common/event-emitter/handle';
|
|
6
6
|
import { warn } from '../../common/util/console';
|
|
7
|
-
import { V2_TYPES } from '../../common/
|
|
7
|
+
import { V2_TYPES } from '../../common/v2/utils';
|
|
8
8
|
import { FEATURE_NAMES } from '../features/features';
|
|
9
9
|
import { now } from '../../common/timing/now';
|
|
10
10
|
import { SUPPORTABILITY_METRIC_CHANNEL } from '../../features/metrics/constants';
|
|
@@ -17,7 +17,7 @@ import { single } from '../../common/util/invoke';
|
|
|
17
17
|
import { measure } from './measure';
|
|
18
18
|
import { recordCustomEvent } from './recordCustomEvent';
|
|
19
19
|
import { subscribeToPageUnload } from '../../common/window/page-visibility';
|
|
20
|
-
import { findScriptTimings } from '../../common/
|
|
20
|
+
import { findScriptTimings } from '../../common/v2/script-tracker';
|
|
21
21
|
import { generateRandomHexString } from '../../common/ids/unique-id';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -26,6 +26,23 @@ import { generateRandomHexString } from '../../common/ids/unique-id';
|
|
|
26
26
|
|
|
27
27
|
const PROTECTED_KEYS = ['name', 'id', 'type'];
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Map of API methods to their names (prevents minification from breaking method name references)
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
const METHOD_NAMES = new Map([[addPageAction, 'addPageAction'], [log, 'log'], [measure, 'measure'], [noticeError, 'noticeError'], [recordCustomEvent, 'recordCustomEvent']]);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Warning functions that only fire once - can be reset in tests
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
export const warnings = {
|
|
40
|
+
experimental: single(() => warn(54, 'newrelic.register')),
|
|
41
|
+
disabled: single(() => warn(55)),
|
|
42
|
+
invalidTarget: single(target => warn(48, target)),
|
|
43
|
+
deregistered: single(() => warn(68))
|
|
44
|
+
};
|
|
45
|
+
|
|
29
46
|
/**
|
|
30
47
|
* @experimental
|
|
31
48
|
* IMPORTANT: This feature is being developed for use internally and is not in a public-facing production-ready state.
|
|
@@ -42,18 +59,17 @@ export function setupRegisterAPI(agent) {
|
|
|
42
59
|
* Also conducts certain side-effects, such as harvesting a PageView event when triggered and gathering metadata for the registered entity.
|
|
43
60
|
* @param {Object} agentRef the reference to the base agent instance
|
|
44
61
|
* @param {import('./register-api-types').RegisterAPIConstructor} target
|
|
45
|
-
* @param {import('./register-api-types').RegisterAPIConstructor} [parent]
|
|
46
62
|
* @returns {RegisterAPI} the api object to be returned from the register api method
|
|
47
63
|
*/
|
|
48
|
-
function register(agentRef, target
|
|
49
|
-
|
|
64
|
+
function register(agentRef, target) {
|
|
65
|
+
warnings.experimental();
|
|
50
66
|
target ||= {};
|
|
51
67
|
target.instance = generateRandomHexString(8);
|
|
52
68
|
target.type = V2_TYPES.MFE;
|
|
53
69
|
target.licenseKey ||= agentRef.info.licenseKey; // will inherit the license key from the container agent if not provided for brevity. A future state may dictate that we need different license keys to do different things.
|
|
54
70
|
target.blocked = false;
|
|
55
71
|
if (typeof target.tags !== 'object' || target.tags === null || Array.isArray(target.tags)) target.tags = {};
|
|
56
|
-
target.parent
|
|
72
|
+
target.parent ??= {
|
|
57
73
|
get id() {
|
|
58
74
|
return agentRef.runtime.appMetadata.agents[0].entityGuid;
|
|
59
75
|
},
|
|
@@ -62,18 +78,22 @@ function register(agentRef, target, parent) {
|
|
|
62
78
|
};
|
|
63
79
|
const timings = findScriptTimings();
|
|
64
80
|
const attrs = {};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
|
|
82
|
+
// Only define attributes getter if it doesn't already exist
|
|
83
|
+
if (!Object.prototype.hasOwnProperty.call(target, 'attributes')) {
|
|
84
|
+
Object.defineProperty(target, 'attributes', {
|
|
85
|
+
get() {
|
|
86
|
+
return {
|
|
87
|
+
...attrs,
|
|
88
|
+
'source.id': target.id,
|
|
89
|
+
'source.name': target.name,
|
|
90
|
+
'source.type': target.type,
|
|
91
|
+
'parent.type': target.parent?.type || V2_TYPES.BA,
|
|
92
|
+
'parent.id': target.parent?.id
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
77
97
|
|
|
78
98
|
// Process tags object and add to attrs, excluding protected keys
|
|
79
99
|
Object.entries(target.tags).forEach(([key, value]) => {
|
|
@@ -81,23 +101,11 @@ function register(agentRef, target, parent) {
|
|
|
81
101
|
attrs["source.".concat(key)] = value;
|
|
82
102
|
}
|
|
83
103
|
});
|
|
84
|
-
target.isolated ??= true;
|
|
85
104
|
|
|
86
105
|
/** @type {Function} a function that is set and reports when APIs are triggered -- warns the customer of the invalid state */
|
|
87
106
|
let invalidApiResponse = () => {};
|
|
88
107
|
/** @type {Array} the array of registered target APIs */
|
|
89
108
|
const registeredEntities = agentRef.runtime.registeredEntities;
|
|
90
|
-
if (!target.isolated) {
|
|
91
|
-
/** if we have already registered this non-isolated target, go ahead and re-use it */
|
|
92
|
-
const sharedEntity = registeredEntities.find(({
|
|
93
|
-
metadata: {
|
|
94
|
-
target: {
|
|
95
|
-
id
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}) => id === target.id && !target.isolated);
|
|
99
|
-
if (sharedEntity) return sharedEntity;
|
|
100
|
-
}
|
|
101
109
|
|
|
102
110
|
/**
|
|
103
111
|
* Block the API, and supply a warning function to display a message to end users
|
|
@@ -112,8 +120,8 @@ function register(agentRef, target, parent) {
|
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
/** primary cases that can block the register API from working at init time */
|
|
115
|
-
if (!agentRef.init.api.
|
|
116
|
-
if (!hasValidValue(target.id) || !hasValidValue(target.name)) block(
|
|
123
|
+
if (!agentRef.init.api.register.enabled) block(warnings.disabled);
|
|
124
|
+
if (!hasValidValue(target.id) || !hasValidValue(target.name)) block(() => warnings.invalidTarget(target));
|
|
117
125
|
|
|
118
126
|
/** @type {RegisterAPI} */
|
|
119
127
|
const api = {
|
|
@@ -124,7 +132,7 @@ function register(agentRef, target, parent) {
|
|
|
124
132
|
deregister: () => {
|
|
125
133
|
/** note: blocking this instance will disable access for all entities sharing the instance, and will invalidate it from the v2 checks */
|
|
126
134
|
reportTimings();
|
|
127
|
-
block(
|
|
135
|
+
block(warnings.deregistered);
|
|
128
136
|
},
|
|
129
137
|
log: (message, options = {}) => report(log, [message, {
|
|
130
138
|
...options,
|
|
@@ -144,7 +152,6 @@ function register(agentRef, target, parent) {
|
|
|
144
152
|
...attrs,
|
|
145
153
|
...attributes
|
|
146
154
|
}, agentRef], target),
|
|
147
|
-
register: (target = {}) => report(register, [agentRef, target], api.metadata.target),
|
|
148
155
|
recordCustomEvent: (eventType, attributes = {}) => report(recordCustomEvent, [eventType, {
|
|
149
156
|
...attrs,
|
|
150
157
|
...attributes
|
|
@@ -186,20 +193,24 @@ function register(agentRef, target, parent) {
|
|
|
186
193
|
// only ever report the timings the first time this is called
|
|
187
194
|
if (timings.reportedAt) return;
|
|
188
195
|
timings.reportedAt = now();
|
|
196
|
+
const timeToFetch = timings.fetchEnd - timings.fetchStart; // fetchStart to fetchEnd
|
|
197
|
+
const timeToExecute = timings.scriptEnd - timings.scriptStart; // scriptStart to scriptEnd
|
|
189
198
|
api.recordCustomEvent('MicroFrontEndTiming', {
|
|
190
199
|
assetUrl: timings.asset,
|
|
191
200
|
// the url of the script that was registered, or undefined if it could not be determined (inline or no match)
|
|
192
201
|
assetType: timings.type,
|
|
193
202
|
// the type of asset that was associated with the timings, one of 'script', 'link' (if preloaded and found in the resource timing buffer), 'preload' (if preloaded but not found in the resource timing buffer), or "unknown" if it could not be determined
|
|
194
|
-
|
|
195
|
-
//
|
|
203
|
+
timeAlive: timings.reportedAt - timings.registeredAt,
|
|
204
|
+
// registeredAt to reportedAt
|
|
196
205
|
timeToBeRequested: timings.fetchStart,
|
|
197
206
|
// origin to fetchStart
|
|
198
|
-
|
|
207
|
+
timeToExecute,
|
|
208
|
+
// scriptStart to scriptEnd
|
|
209
|
+
timeToFetch,
|
|
199
210
|
// fetchStart to fetchEnd
|
|
200
|
-
|
|
201
|
-
//
|
|
202
|
-
|
|
211
|
+
timeToLoad: timeToFetch + timeToExecute,
|
|
212
|
+
// fetch time and script time together
|
|
213
|
+
timeToRegister: timings.registeredAt // timestamp when register() was called
|
|
203
214
|
});
|
|
204
215
|
}
|
|
205
216
|
|
|
@@ -216,7 +227,7 @@ function register(agentRef, target, parent) {
|
|
|
216
227
|
|
|
217
228
|
/**
|
|
218
229
|
* The reporter method that will be used to report the data to the container agent's API method. If invalid, will log a warning and not execute.
|
|
219
|
-
* If the api.
|
|
230
|
+
* If the api.register.duplicate_data_to_container configuration value is set to true, the data will be reported to BOTH the container and the external target
|
|
220
231
|
* @param {*} methodToCall the container agent's API method to call
|
|
221
232
|
* @param {*} args the arguments to supply to the container agent's API method
|
|
222
233
|
* @param {string} target the target to report the data to. If undefined, will report to the container agent's target.
|
|
@@ -227,7 +238,8 @@ function register(agentRef, target, parent) {
|
|
|
227
238
|
if (isBlocked() && methodToCall !== register) return;
|
|
228
239
|
/** set the timestamp before the async part of waiting for the rum response for better accuracy */
|
|
229
240
|
const timestamp = now();
|
|
230
|
-
|
|
241
|
+
const methodName = METHOD_NAMES.get(methodToCall) || 'unknown';
|
|
242
|
+
handle(SUPPORTABILITY_METRIC_CHANNEL, ["API/register/".concat(methodName, "/called")], undefined, FEATURE_NAMES.metrics, agentRef.ee);
|
|
231
243
|
try {
|
|
232
244
|
return methodToCall(...args, target, timestamp); // always report to target
|
|
233
245
|
} catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/harvester.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.js","../src/common/util/browser-stack-matchers.js","../src/common/util/console.js","../src/common/util/data-size.js","../src/common/util/event-origin.js","../src/common/util/feature-flags.js","../src/common/util/get-or-set.js","../src/common/util/invoke.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.js","../src/common/util/
|
|
1
|
+
{"root":["../src/index.js","../src/cdn/experimental.js","../src/cdn/lite.js","../src/cdn/pro.js","../src/cdn/spa.js","../src/common/aggregate/aggregator.js","../src/common/aggregate/event-aggregator.js","../src/common/config/configurable.js","../src/common/config/info.js","../src/common/config/init-types.js","../src/common/config/init.js","../src/common/config/loader-config.js","../src/common/config/runtime.js","../src/common/constants/agent-constants.js","../src/common/constants/env.cdn.js","../src/common/constants/env.js","../src/common/constants/env.npm.js","../src/common/constants/runtime.js","../src/common/constants/shared-channel.js","../src/common/deny-list/deny-list.js","../src/common/dispatch/global-event.js","../src/common/dom/iframe.js","../src/common/dom/query-selector.js","../src/common/dom/selector-path.js","../src/common/drain/drain.js","../src/common/event-emitter/contextual-ee.js","../src/common/event-emitter/event-context.js","../src/common/event-emitter/handle.js","../src/common/event-emitter/register-handler.js","../src/common/event-listener/event-listener-opts.js","../src/common/harvest/harvester.js","../src/common/harvest/types.js","../src/common/ids/bundle-id.js","../src/common/ids/id.js","../src/common/ids/unique-id.js","../src/common/serialize/bel-serializer.js","../src/common/session/constants.js","../src/common/session/session-entity.js","../src/common/storage/local-storage.js","../src/common/timer/interaction-timer.js","../src/common/timer/timer.js","../src/common/timing/nav-timing.js","../src/common/timing/now.js","../src/common/timing/time-keeper.js","../src/common/unload/eol.js","../src/common/url/canonicalize-url.js","../src/common/url/clean-url.js","../src/common/url/encode.js","../src/common/url/extract-url.js","../src/common/url/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.js","../src/common/util/attribute-size.js","../src/common/util/browser-stack-matchers.js","../src/common/util/console.js","../src/common/util/data-size.js","../src/common/util/event-origin.js","../src/common/util/feature-flags.js","../src/common/util/get-or-set.js","../src/common/util/invoke.js","../src/common/util/monkey-patched.js","../src/common/util/obfuscate.js","../src/common/util/short-circuit.js","../src/common/util/stringify.js","../src/common/util/submit-data.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.js","../src/common/util/webdriver-detection.js","../src/common/v2/script-correlation.js","../src/common/v2/script-tracker.js","../src/common/v2/utils.js","../src/common/vitals/constants.js","../src/common/vitals/cumulative-layout-shift.js","../src/common/vitals/first-contentful-paint.js","../src/common/vitals/first-paint.js","../src/common/vitals/interaction-to-next-paint.js","../src/common/vitals/largest-contentful-paint.js","../src/common/vitals/load-time.js","../src/common/vitals/time-to-first-byte.js","../src/common/vitals/vital-metric.js","../src/common/window/load.js","../src/common/window/nreum.js","../src/common/window/page-visibility.js","../src/common/wrap/wrap-events.js","../src/common/wrap/wrap-fetch.js","../src/common/wrap/wrap-function.js","../src/common/wrap/wrap-history.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-websocket.js","../src/common/wrap/wrap-xhr.js","../src/features/ajax/constants.js","../src/features/ajax/index.js","../src/features/ajax/aggregate/gql.js","../src/features/ajax/aggregate/index.js","../src/features/ajax/instrument/distributed-tracing.js","../src/features/ajax/instrument/index.js","../src/features/ajax/instrument/response-size.js","../src/features/generic_events/constants.js","../src/features/generic_events/index.js","../src/features/generic_events/aggregate/index.js","../src/features/generic_events/aggregate/user-actions/aggregated-user-action.js","../src/features/generic_events/aggregate/user-actions/user-actions-aggregator.js","../src/features/generic_events/instrument/index.js","../src/features/jserrors/constants.js","../src/features/jserrors/index.js","../src/features/jserrors/aggregate/canonical-function-name.js","../src/features/jserrors/aggregate/cause-string.js","../src/features/jserrors/aggregate/compute-stack-trace.js","../src/features/jserrors/aggregate/format-stack-trace.js","../src/features/jserrors/aggregate/index.js","../src/features/jserrors/aggregate/internal-errors.js","../src/features/jserrors/aggregate/string-hash-code.js","../src/features/jserrors/instrument/index.js","../src/features/jserrors/shared/cast-error.js","../src/features/jserrors/shared/uncaught-error.js","../src/features/logging/constants.js","../src/features/logging/index.js","../src/features/logging/aggregate/index.js","../src/features/logging/instrument/index.js","../src/features/logging/shared/log.js","../src/features/logging/shared/utils.js","../src/features/metrics/constants.js","../src/features/metrics/index.js","../src/features/metrics/aggregate/framework-detection.js","../src/features/metrics/aggregate/harvest-metadata.js","../src/features/metrics/aggregate/index.js","../src/features/metrics/instrument/index.js","../src/features/page_action/constants.js","../src/features/page_action/index.js","../src/features/page_action/instrument/index.js","../src/features/page_view_event/constants.js","../src/features/page_view_event/index.js","../src/features/page_view_event/aggregate/index.js","../src/features/page_view_event/aggregate/initialized-features.js","../src/features/page_view_event/instrument/index.js","../src/features/page_view_timing/constants.js","../src/features/page_view_timing/index.js","../src/features/page_view_timing/aggregate/index.js","../src/features/page_view_timing/instrument/index.js","../src/features/session_replay/constants.js","../src/features/session_replay/index.js","../src/features/session_replay/aggregate/index.js","../src/features/session_replay/instrument/index.js","../src/features/session_replay/shared/recorder-events.js","../src/features/session_replay/shared/recorder.js","../src/features/session_replay/shared/stylesheet-evaluator.js","../src/features/session_replay/shared/utils.js","../src/features/session_trace/constants.js","../src/features/session_trace/index.js","../src/features/session_trace/aggregate/index.js","../src/features/session_trace/aggregate/trace/node.js","../src/features/session_trace/aggregate/trace/storage.js","../src/features/session_trace/aggregate/trace/utils.js","../src/features/session_trace/instrument/index.js","../src/features/soft_navigations/constants.js","../src/features/soft_navigations/index.js","../src/features/soft_navigations/aggregate/ajax-node.js","../src/features/soft_navigations/aggregate/bel-node.js","../src/features/soft_navigations/aggregate/index.js","../src/features/soft_navigations/aggregate/initial-page-load-interaction.js","../src/features/soft_navigations/aggregate/interaction.js","../src/features/soft_navigations/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/event-buffer.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/interfaces/registered-entity.js","../src/loaders/agent-base.js","../src/loaders/agent.js","../src/loaders/api-base.js","../src/loaders/browser-agent.js","../src/loaders/micro-agent-base.js","../src/loaders/micro-agent.js","../src/loaders/api/addPageAction.js","../src/loaders/api/addRelease.js","../src/loaders/api/addToTrace.js","../src/loaders/api/consent.js","../src/loaders/api/constants.js","../src/loaders/api/finished.js","../src/loaders/api/interaction-types.js","../src/loaders/api/interaction.js","../src/loaders/api/log.js","../src/loaders/api/measure.js","../src/loaders/api/noticeError.js","../src/loaders/api/pauseReplay.js","../src/loaders/api/recordCustomEvent.js","../src/loaders/api/recordReplay.js","../src/loaders/api/register-api-types.js","../src/loaders/api/register.js","../src/loaders/api/setApplicationVersion.js","../src/loaders/api/setCustomAttribute.js","../src/loaders/api/setErrorHandler.js","../src/loaders/api/setPageViewName.js","../src/loaders/api/setUserId.js","../src/loaders/api/sharedHandlers.js","../src/loaders/api/start.js","../src/loaders/api/topLevelCallers.js","../src/loaders/api/wrapLogger.js","../src/loaders/configure/configure.js","../src/loaders/configure/nonce.js","../src/loaders/configure/public-path.js","../src/loaders/features/enabled-features.js","../src/loaders/features/featureDependencies.js","../src/loaders/features/features.js"],"version":"5.9.3"}
|
|
@@ -20,14 +20,16 @@ export type Init = {
|
|
|
20
20
|
autoStart?: boolean | undefined;
|
|
21
21
|
} | undefined;
|
|
22
22
|
api?: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
register?: {
|
|
24
|
+
/**
|
|
25
|
+
* - If true, the agent will allow registered children to be sent to the server.
|
|
26
|
+
*/
|
|
27
|
+
enabled?: boolean | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* - If true, the agent will capture registered child data to the main agent as well as the registered child.
|
|
30
|
+
*/
|
|
31
|
+
duplicate_data_to_container?: boolean | undefined;
|
|
32
|
+
} | undefined;
|
|
31
33
|
} | undefined;
|
|
32
34
|
distributed_tracing?: {
|
|
33
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-types.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init-types.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init-types.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init-types.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsCsB,MAAM,GAAG,MAAM;qBAAe,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA+IO,0CAEN;mBAtIY,OAAO,cAAc,EAAE,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-keeper.d.ts","sourceRoot":"","sources":["../../../../src/common/timing/time-keeper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time-keeper.d.ts","sourceRoot":"","sources":["../../../../src/common/timing/time-keeper.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;IA6BE,6BAIC;IAsBD,qBAEC;IAED,kCAEC;IAED,4BAEC;IAED;;;;;;OAMG;IACH,8BALsB,cAAc,aACf,MAAM,WACR,MAAM,gBACD,MAAM,QAqB7B;IAED;;;;;OAKG;IACH,uCAHwB,MAAM,GACjB,MAAM,CAKlB;IAED;;;;;OAKG;IACH,0CAFa,MAAM,CAKlB;IAED;;;;OAIG;IACH,oCAHqB,MAAM,GACf,MAAM,CAKjB;IAED;;;;OAIG;IACH,uCAHW,mBAAmB,GACjB,MAAM,CAKlB;IAED,+FAA+F;IAC/F,0BASC;;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020-2026 New Relic, Inc. All rights reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/** A special error used to short-circuit the error processing pipeline */
|
|
6
|
+
export class ShortCircuit extends Error {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=short-circuit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-circuit.d.ts","sourceRoot":"","sources":["../../../../src/common/util/short-circuit.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,0EAA0E;AAC1E;CAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-data.d.ts","sourceRoot":"","sources":["../../../../src/common/util/submit-data.js"],"names":[],"mappings":"AAaA;;GAEG;AAEH;;;;;GAKG;AACH,qDAHG;IAAsB,cAAc,EAA5B,OAAO;CAEjB,gDAcA;AAED;;;;;;;GAOG;AACH;;;;;;;;IAFa,OAAO,CAAC,QAAQ,CAAC,CAkB7B;AAED;;;;;;;;;GASG;AACH,0DAPG;IAAqB,GAAG,EAAhB,MAAM;IACQ,IAAI,GAAlB,MAAM,YAAC;IACQ,IAAI,GAAnB,OAAO,YAAC;IACO,MAAM,GAArB,MAAM,YAAC;IAC+B,OAAO;aAAvC,MAAM;eAAS,MAAM;;CACnC,GAAU,cAAc,
|
|
1
|
+
{"version":3,"file":"submit-data.d.ts","sourceRoot":"","sources":["../../../../src/common/util/submit-data.js"],"names":[],"mappings":"AAaA;;GAEG;AAEH;;;;;GAKG;AACH,qDAHG;IAAsB,cAAc,EAA5B,OAAO;CAEjB,gDAcA;AAED;;;;;;;GAOG;AACH;;;;;;;;IAFa,OAAO,CAAC,QAAQ,CAAC,CAkB7B;AAED;;;;;;;;;GASG;AACH,0DAPG;IAAqB,GAAG,EAAhB,MAAM;IACQ,IAAI,GAAlB,MAAM,YAAC;IACQ,IAAI,GAAnB,OAAO,YAAC;IACO,MAAM,GAArB,MAAM,YAAC;IAC+B,OAAO;aAAvC,MAAM;eAAS,MAAM;;CACnC,GAAU,cAAc,CAa1B;AAED;;;;;;GAMG;AACH,sCAJG;IAAqB,GAAG,EAAhB,MAAM;IACQ,IAAI,GAAlB,MAAM,YAAC;CACf,GAAU,OAAO,CAanB;6BA3FY,0BAAU"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020-2026 New Relic, Inc. All rights reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Represents script correlation data combining DOM and Performance API information
|
|
7
|
+
*/
|
|
8
|
+
export class ScriptCorrelation {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new ScriptCorrelation instance
|
|
11
|
+
* @param {string} url - The cleaned URL of the script
|
|
12
|
+
*/
|
|
13
|
+
constructor(url: string);
|
|
14
|
+
/** @type {CorrelationTiming} [dom] - DOM-related information */
|
|
15
|
+
dom: CorrelationTiming;
|
|
16
|
+
/** @type {CorrelationTiming} [performance] - Performance-related information */
|
|
17
|
+
performance: CorrelationTiming;
|
|
18
|
+
/** @type {string} The cleaned URL of the script */
|
|
19
|
+
url: string;
|
|
20
|
+
/**
|
|
21
|
+
* Gets the script timing, using DOM timings if available, otherwise falling back to performance timings or registeredAt as appropriate. This is used to provide the most accurate script timing possible for registered entities.
|
|
22
|
+
* @returns {{start: number, end: number}
|
|
23
|
+
*/
|
|
24
|
+
get script(): {
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
declare class CorrelationTiming {
|
|
30
|
+
/** @type {number} [start] - The startTime from the performance entry */
|
|
31
|
+
start: number;
|
|
32
|
+
/** @type {number} [end] - The responseEnd from the performance entry */
|
|
33
|
+
end: number;
|
|
34
|
+
/** @type {*} [value] - The entry value */
|
|
35
|
+
value: any;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=script-correlation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-correlation.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/script-correlation.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;GAEG;AACH;IAME;;;OAGG;IACH,iBAFW,MAAM,EAKhB;IAZD,gEAAgE;IAChE,KADW,iBAAiB,CACC;IAC7B,gFAAgF;IAChF,aADW,iBAAiB,CACS;IAOnC,mDAAmD;IACnD,KADW,MAAM,CACH;IAGhB;;;OAGG;IACH,cAFa;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CASxC;CACF;AAED;IACE,wEAAwE;IACxE,OADW,MAAM,CACR;IACT,wEAAwE;IACxE,KADW,MAAM,CACV;IACP,0CAA0C;IAC1C,OADW,GAAC,CACK;CAClB"}
|
|
@@ -19,5 +19,8 @@ export function findScriptTimings(): RegisterAPITimings;
|
|
|
19
19
|
*/
|
|
20
20
|
/** export for testing purposes */
|
|
21
21
|
export let thisFile: any;
|
|
22
|
+
/** @type {Map<string, ScriptCorrelation>} - Central registry for script correlations containing both DOM and Performance data */
|
|
23
|
+
export const scriptCorrelations: Map<string, ScriptCorrelation>;
|
|
22
24
|
export type RegisterAPITimings = any;
|
|
25
|
+
import { ScriptCorrelation } from './script-correlation';
|
|
23
26
|
//# sourceMappingURL=script-tracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-tracker.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/script-tracker.js"],"names":[],"mappings":"AA+GA;;;;GAIG;AACH,4CAHW,MAAM,GACJ,MAAM,EAAE,CAsBpB;AAED;;;GAGG;AACH,qCAFa,KAAK,CAAC,KAAK,GAAG,SAAS,CAanC;AA6CD;;;GAGG;AACH,qCAFa,kBAAkB,CA2D9B;AAxPD;;GAEG;AAEH,kCAAkC;AAClC,yBAAmB;AAUnB,iIAAiI;AACjI,iCADW,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CACE;;kCAlBT,sBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/v2/utils.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,+CAJW,MAAM,GAAC,MAAM,YACb,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAMpF;AAED;;;;;GAKG;AACH,2DAJW,MAAM,YACN,GAAC,GACC,OAAO,oCAAoC,EAAE,yBAAyB,EAAE,CAMpF;AAED;;;;;;;GAOG;AACH,+CAJW,MAAM,sBACN,iBAAiB,GACf,MAAM,CAclB;AAED;;;;;;;GAOG;AACH,yDAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,wCAJW,OAAO,oCAAoC,EAAE,yBAAyB,qBACtE,GAAC,GACC,OAAO,CAInB;AAED;;;;GAIG;AACH,oDAHW,GAAC,SAkBX;;;;uBApGS,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IAGjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IAGjC,2BAqQC;IAnQC,gCAAkG;IAsQpG;;;;;;;;;;;;OAYG;IACH,eAJW,MAAM,YAAC,WACP,MAAM,YAAC,QAmCjB;IAED,qCAEC;IAED;;;MAEC;;CAsBF;8BAjW6B,4BAA4B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class Instrument extends InstrumentBase {
|
|
2
2
|
static featureName: string;
|
|
3
3
|
constructor(agentRef: any);
|
|
4
|
-
removeOnAbort: AbortController
|
|
4
|
+
removeOnAbort: AbortController;
|
|
5
5
|
abortHandler: () => void;
|
|
6
6
|
}
|
|
7
7
|
export const GenericEvents: typeof Instrument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/instrument/index.js"],"names":[],"mappings":"AAwBA;IACE,2BAAiC;IACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/generic_events/instrument/index.js"],"names":[],"mappings":"AAwBA;IACE,2BAAiC;IACjC,2BA0GC;IAnFC,+BAA0C;IAC1C,yBAGC;CAgFJ;AAED,8CAAuC;+BAzHR,6BAA6B"}
|
|
@@ -14,25 +14,34 @@ export class Aggregate extends AggregateBase {
|
|
|
14
14
|
pve: string;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* by a newline character. Lines take the form `<functionName>@<url>:<lineNumber>`.
|
|
17
|
+
* Main entry point for processing JavaScript errors. This method orchestrates the complete error processing pipeline.
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
* Processing Flow:
|
|
20
|
+
* 1. Filter the error through the customer's onerror handler (if configured and not internal)
|
|
21
|
+
* 2. Compute the stack trace from the error object
|
|
22
|
+
* 3. Evaluate if the error should be swallowed (internal errors, known issues, etc.)
|
|
23
|
+
* 4. Derive target(s) for the error (MFE detection for v2 endpoints, or default target) - Note: "undefined" indicates the default target will be used
|
|
24
|
+
* 5. Store the error for each derived target. During storage (#storeJserrorForHarvest), duplication for MFE <-> container will be handled
|
|
25
|
+
*
|
|
26
|
+
* Important: "ShortCircuit" Pattern:
|
|
27
|
+
* Several steps in the pipeline can throw a ShortCircuit error to halt processing without
|
|
28
|
+
* treating it as a reportable error. This pattern is used when:
|
|
29
|
+
* - The customer's onerror handler returns a truthy value (excluding fingerprinting objects)
|
|
30
|
+
* - The error is identified as an internal error that shouldn't be reported
|
|
31
|
+
*
|
|
32
|
+
* When a ShortCircuit is thrown, processing stops immediately and the error is not stored.
|
|
33
|
+
* Any other thrown error is re-thrown as it represents an actual problem in the agent code.
|
|
25
34
|
*
|
|
26
|
-
* @param {Error|UncaughtError} err The error instance to be processed
|
|
27
|
-
* @param {number} time
|
|
28
|
-
* @param {boolean
|
|
29
|
-
* @param {object
|
|
30
|
-
* @param {boolean
|
|
31
|
-
* @param {string
|
|
32
|
-
* @param {object
|
|
33
|
-
* @returns
|
|
35
|
+
* @param {Error|UncaughtError} err - The error instance to be processed
|
|
36
|
+
* @param {number} [time] - The relative ms (to origin) timestamp of occurrence. Defaults to now()
|
|
37
|
+
* @param {boolean} [internal=false] - If the error was "caught" and deemed "internal" before reporting to the jserrors feature
|
|
38
|
+
* @param {object} [customAttributes] - Any custom attributes to be included in the error payload
|
|
39
|
+
* @param {boolean} [hasReplay=false] - A flag indicating if the error occurred during a replay session
|
|
40
|
+
* @param {string} [swallowReason] - A string indicating pre-defined reason if swallowing the error. Mainly used by internal error supportability metrics
|
|
41
|
+
* @param {object} [target] - The target to buffer and harvest to. If undefined, the default configuration target is used
|
|
42
|
+
* @returns {void}
|
|
34
43
|
*/
|
|
35
|
-
|
|
44
|
+
processError(err: Error | UncaughtError, time?: number, internal?: boolean, customAttributes?: object, hasReplay?: boolean, swallowReason?: string, target?: object): void;
|
|
36
45
|
#private;
|
|
37
46
|
}
|
|
38
47
|
export type StackInfo = import("./compute-stack-trace.js").StackInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAyBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,2BAuBC;IAlBC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,qBAAwB;IAiB1B,oDAEC;IAED;;;MAcC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,kBATW,KAAK,GAAC,aAAa,SACnB,MAAM,aACN,OAAO,qBACP,MAAM,cACN,OAAO,kBACP,MAAM,WACN,MAAM,GACJ,IAAI,CAiBhB;;CAyQF;wBAtWY,OAAO,0BAA0B,EAAE,SAAS;8BAT3B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/metrics/instrument/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/metrics/instrument/index.js"],"names":[],"mappings":"AAQA;IACE,2BAAiC;IACjC,2BAIC;CACF;AAED,wCAAiC;+BAZF,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IAEjC,2BAgBC;IAZC,0GAA0G;IAC1G,cAAyB;IACzB,mIAAmI;IACnI,uBAA0B;IAC1B,0CAA0C;IAC1C,oBAAuB;IACvB,0GAA0G;IAC1G,2BAA0C;IAO5C,gLAAgL;IAChL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AAiBA;IACE,2BAAiC;IAEjC,2BAgBC;IAZC,0GAA0G;IAC1G,cAAyB;IACzB,mIAAmI;IACnI,uBAA0B;IAC1B,0CAA0C;IAC1C,oBAAuB;IACvB,0GAA0G;IAC1G,2BAA0C;IAO5C,gLAAgL;IAChL,mEA2DC;IApDG,iCAAuB;IACvB,yJAAyJ;IACzJ,UAAsC;IACtC,eAA2D;IAyBD,UAAgE;IA0B9H,qCAWC;IAED,0CAIC;IAED;;;;;;;MAgDC;IAED,8DAA8D;IAC9D,qBAUC;IAED,2DAA2D;IAC3D,uBAMC;IAED,sCAGC;CACF;8BA7L6B,4BAA4B;6BAC7B,iBAAiB"}
|
|
@@ -25,16 +25,6 @@ export class RegisteredEntity {
|
|
|
25
25
|
* @param {object} [attributes] JSON object with one or more key/value pairs. For example: {key:"value"}. The key is reported as its own PageAction attribute with the specified values.
|
|
26
26
|
*/
|
|
27
27
|
addPageAction(name: string, attributes?: object): void;
|
|
28
|
-
/**
|
|
29
|
-
* @experimental
|
|
30
|
-
* IMPORTANT: This feature is being developed for use internally and is not in a public-facing production-ready state.
|
|
31
|
-
* It is not recommended for use in production environments and will not receive support for issues.
|
|
32
|
-
*
|
|
33
|
-
* Registers an external caller to report through the base agent to a different target than the base agent. Will be related to this registered entity when called through this access point.
|
|
34
|
-
* @param {import('../loaders/api/register-api-types').RegisterAPIConstructor} target the target object to report data to
|
|
35
|
-
@returns {import('../loaders/api/register-api-types').RegisterAPI} Returns an object that contains the available API methods and configurations to use with the external caller. See loaders/api/api.js for more information.
|
|
36
|
-
*/
|
|
37
|
-
register(target: import("../loaders/api/register-api-types").RegisterAPIConstructor): import("../loaders/api/register-api-types").RegisterAPI;
|
|
38
28
|
/**
|
|
39
29
|
* @experimental
|
|
40
30
|
* IMPORTANT: This feature is being developed for use internally and is not in a public-facing production-ready state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registered-entity.d.ts","sourceRoot":"","sources":["../../../src/interfaces/registered-entity.js"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH;;;;;;GAMG;AACH;
|
|
1
|
+
{"version":3,"file":"registered-entity.d.ts","sourceRoot":"","sources":["../../../src/interfaces/registered-entity.js"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH;;;;;;GAMG;AACH;IACE;;;OAGG;IACH,kBAFW,sBAAsB,EAiBhC;IAbC,kCAAkC;IAClC,UADW,mBAAmB,CAK7B;IAUH;;;;;OAKG;IACH,oBAHW,MAAM,eACN,MAAM,QAKhB;IAED;;;;;;;OAOG;IACH,cAFa,IAAI,CAIhB;IAED;;;;;SAKK;IACL,6BAHa,MAAM,eACN,MAAM,QAIlB;IAED;;;;;;OAMG;IACH,cAJW,MAAM,YACN;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC,GACvF;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAC,CAIpF;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,IAAI,YAC1B,OAAO,QAKjB;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,qBACZ,MAAM,QAKhB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GAAC,IAAI,iBACX,OAAO,QAKjB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,QAOrB;IAED;;;;;MAKE;IACF,aAHW,MAAM,YACN;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,CAAA;KAAC,QAKpF;CACF;0BAvIY,OAAO,mCAAmC,EAAE,WAAW;kCACvD,OAAO,mCAAmC,EAAE,mBAAmB;qCAC/D,OAAO,mCAAmC,EAAE,sBAAsB"}
|
|
@@ -16,10 +16,6 @@ export type RegisterAPI = {
|
|
|
16
16
|
* - Notice an error for the registered entity.
|
|
17
17
|
*/
|
|
18
18
|
noticeError: (error: Error | string, customAttributes?: object) => void;
|
|
19
|
-
/**
|
|
20
|
-
* - Record a custom event for the registered entity.
|
|
21
|
-
*/
|
|
22
|
-
register: (target: RegisterAPIConstructor) => RegisterAPI;
|
|
23
19
|
/**
|
|
24
20
|
* - Deregister the registered entity, which blocks its use and captures end of life timings.
|
|
25
21
|
*/
|
|
@@ -74,9 +70,9 @@ export type RegisterAPIConstructor = {
|
|
|
74
70
|
[key: string]: any;
|
|
75
71
|
} | undefined;
|
|
76
72
|
/**
|
|
77
|
-
* -
|
|
73
|
+
* - The parent target for the registered entity. If none was supplied, it will assume the entity guid from the main agent.
|
|
78
74
|
*/
|
|
79
|
-
|
|
75
|
+
parent?: RegisterAPITarget | undefined;
|
|
80
76
|
/**
|
|
81
77
|
* - The parentId for the registered entity. If none was supplied, it will assume the entity guid from the main agent.
|
|
82
78
|
*/
|
|
@@ -90,11 +86,11 @@ export type RegisterAPIMetadata = {
|
|
|
90
86
|
/**
|
|
91
87
|
* - The timing metrics for the registered entity.
|
|
92
88
|
*/
|
|
93
|
-
timings: RegisterAPITimings
|
|
89
|
+
timings: Partial<RegisterAPITimings>;
|
|
94
90
|
/**
|
|
95
91
|
* - The options for the registered entity.
|
|
96
92
|
*/
|
|
97
|
-
target: RegisterAPITarget
|
|
93
|
+
target: Partial<RegisterAPITarget>;
|
|
98
94
|
};
|
|
99
95
|
export type RegisterAPITarget = {
|
|
100
96
|
/**
|
|
@@ -115,10 +111,6 @@ export type RegisterAPITarget = {
|
|
|
115
111
|
* - The parentId for the registered entity. If none was supplied, it will assume the entity guid from the main agent.
|
|
116
112
|
*/
|
|
117
113
|
parentId?: string | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* - When true, each registration creates an isolated instance. When false, multiple registrations with the same id and isolated: false will share a single instance, including all custom attributes, ids, names, and metadata. Calling deregister on a shared instance will deregister it for all entities using the instance. Defaults to true.
|
|
120
|
-
*/
|
|
121
|
-
isolated?: boolean | undefined;
|
|
122
114
|
};
|
|
123
115
|
export type RegisterAPITimings = {
|
|
124
116
|
/**
|
|
@@ -130,19 +122,27 @@ export type RegisterAPITimings = {
|
|
|
130
122
|
*/
|
|
131
123
|
reportedAt?: number | undefined;
|
|
132
124
|
/**
|
|
133
|
-
* - The timestamp when the registered entity began fetching.
|
|
125
|
+
* - The timestamp when the registered entity began fetching (performance.start).
|
|
134
126
|
*/
|
|
135
127
|
fetchStart: number;
|
|
136
128
|
/**
|
|
137
|
-
* - The timestamp when the registered entity finished fetching.
|
|
129
|
+
* - The timestamp when the registered entity finished fetching (performance.end).
|
|
138
130
|
*/
|
|
139
131
|
fetchEnd: number;
|
|
132
|
+
/**
|
|
133
|
+
* - The timestamp when script initialization began (max of dom.start or performance.end, or performance.end if no dom.start).
|
|
134
|
+
*/
|
|
135
|
+
scriptStart: number;
|
|
136
|
+
/**
|
|
137
|
+
* - The timestamp when script loading completed (dom.end or registeredAt if no dom.end).
|
|
138
|
+
*/
|
|
139
|
+
scriptEnd: number;
|
|
140
140
|
/**
|
|
141
141
|
* - The asset path (if found) for the registered entity.
|
|
142
142
|
*/
|
|
143
143
|
asset?: Object | undefined;
|
|
144
144
|
/**
|
|
145
|
-
* - The type of timing associated with the registered entity, 'script' or 'link' if found with the performance resource API, 'inline' if found to be associated with the root document URL, or 'unknown' if no associated resource could be found.
|
|
145
|
+
* - The type of timing associated with the registered entity, 'script' or 'link' if found with the performance resource API, 'fetch' for dynamic imports, 'inline' if found to be associated with the root document URL, or 'unknown' if no associated resource could be found.
|
|
146
146
|
*/
|
|
147
147
|
type: string;
|
|
148
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-api-types.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register-api-types.js"],"names":[],"mappings":";;;;;;mBAOc,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI;;;;SAC3C,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;KAAC,KAAK,IAAI;;;;iBACxH,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,KAAK,IAAI;;;;
|
|
1
|
+
{"version":3,"file":"register-api-types.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register-api-types.js"],"names":[],"mappings":";;;;;;mBAOc,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI;;;;SAC3C,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;KAAC,KAAK,IAAI;;;;iBACxH,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,KAAK,IAAI;;;;gBAC1D,MAAM,IAAI;;;;uBACV,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI;;;;aAChD,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAC,CAAC;;;;2BACtM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;;;wBAC9B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI;;;;eAClF,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI;;;;cACtD,mBAAmB;;;;;;QAKnB,MAAM;;;;UACN,MAAM;;;;;;;;;;;;;;;;;;;;sBAQN,MAAM;;;;aACN,OAAO,CAAC,kBAAkB,CAAC;;;;YAC3B,OAAO,CAAC,iBAAiB,CAAC;;;;;;QAK1B,MAAM;;;;UACN,MAAM;;;;;;;;;;;;;;;;kBAON,MAAM;;;;;;;;gBAEN,MAAM;;;;cACN,MAAM;;;;iBACN,MAAM;;;;eACN,MAAM;;;;;;;;UAEN,MAAM"}
|