@newrelic/browser-agent 1.232.0 → 1.233.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cdn/polyfills.js +5 -2
- package/dist/cjs/common/config/state/configurable.js +15 -26
- package/dist/cjs/common/config/state/info.js +1 -1
- package/dist/cjs/common/config/state/init.js +101 -56
- package/dist/cjs/common/config/state/loader-config.js +1 -1
- package/dist/cjs/common/config/state/runtime.js +1 -5
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/drain/drain.js +1 -1
- package/dist/cjs/common/harvest/harvest-scheduler.js +30 -10
- package/dist/cjs/common/harvest/harvest.js +119 -55
- package/dist/cjs/common/session/session-entity.js +35 -22
- package/dist/cjs/common/session/session-entity.test.js +73 -49
- package/dist/cjs/common/timer/interaction-timer.js +9 -12
- package/dist/cjs/common/url/canonicalize-url.js +32 -0
- package/dist/cjs/common/url/canonicalize-url.test.js +42 -0
- package/dist/cjs/common/url/clean-url.js +10 -3
- package/dist/cjs/common/url/protocol.test.js +0 -1
- package/dist/cjs/common/util/feature-flags.js +2 -1
- package/dist/cjs/common/util/global-scope.js +4 -2
- package/dist/cjs/common/util/submit-data.js +57 -18
- package/dist/cjs/common/wrap/wrap-fetch.js +1 -3
- package/dist/cjs/common/wrap/wrap-function.js +1 -3
- package/dist/cjs/common/wrap/wrap-promise.js +1 -1
- package/dist/cjs/features/ajax/aggregate/index.js +2 -2
- package/dist/cjs/features/ajax/instrument/index.js +1 -1
- package/dist/cjs/features/jserrors/aggregate/canonical-function-name.js +12 -4
- package/dist/cjs/features/jserrors/aggregate/compute-stack-trace.js +93 -10
- package/dist/cjs/features/jserrors/aggregate/compute-stack-trace.test.js +164 -38
- package/dist/cjs/features/jserrors/aggregate/index.js +29 -48
- package/dist/cjs/features/jserrors/instrument/index.js +0 -2
- package/dist/cjs/features/metrics/aggregate/framework-detection.js +67 -0
- package/dist/cjs/features/metrics/aggregate/framework-detection.test.js +137 -0
- package/dist/cjs/features/metrics/aggregate/index.js +7 -3
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.es5.js +14 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.es5.test.js +17 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.js +53 -0
- package/dist/cjs/features/metrics/aggregate/polyfill-detection.test.js +165 -0
- package/dist/cjs/features/page_action/aggregate/index.js +2 -2
- package/dist/cjs/features/page_view_event/aggregate/index.js +6 -3
- package/dist/cjs/features/page_view_timing/aggregate/index.js +2 -2
- package/dist/cjs/features/session_replay/aggregate/index.js +333 -0
- package/dist/cjs/features/session_replay/constants.js +9 -0
- package/dist/cjs/features/session_replay/index.js +12 -0
- package/dist/cjs/features/session_replay/instrument/index.js +29 -0
- package/dist/cjs/features/session_trace/aggregate/index.js +163 -164
- package/dist/cjs/features/session_trace/constants.js +2 -9
- package/dist/cjs/features/session_trace/instrument/index.js +24 -66
- package/dist/cjs/features/spa/aggregate/index.js +2 -2
- package/dist/cjs/features/utils/agent-session.js +1 -2
- package/dist/cjs/features/utils/aggregate-base.js +64 -0
- package/dist/cjs/features/utils/feature-base.js +0 -31
- package/dist/cjs/features/utils/handler-cache.js +3 -4
- package/dist/cjs/features/utils/instrument-base.js +42 -10
- package/dist/cjs/features/utils/{lazy-loader.js → lazy-feature-loader.js} +4 -2
- package/dist/cjs/loaders/agent.js +1 -1
- package/dist/cjs/loaders/api/apiAsync.js +3 -1
- package/dist/cjs/loaders/configure/configure.js +3 -3
- package/dist/cjs/loaders/features/featureDependencies.js +0 -12
- package/dist/cjs/loaders/features/features.js +3 -1
- package/dist/cjs/loaders/micro-agent.js +6 -6
- package/dist/esm/cdn/polyfills.js +5 -2
- package/dist/esm/common/config/state/configurable.js +14 -24
- package/dist/esm/common/config/state/info.js +2 -2
- package/dist/esm/common/config/state/init.js +102 -57
- package/dist/esm/common/config/state/loader-config.js +2 -2
- package/dist/esm/common/config/state/runtime.js +2 -4
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/drain/drain.js +1 -1
- package/dist/esm/common/harvest/harvest-scheduler.js +30 -10
- package/dist/esm/common/harvest/harvest.js +121 -56
- package/dist/esm/common/session/session-entity.js +35 -22
- package/dist/esm/common/session/session-entity.test.js +73 -49
- package/dist/esm/common/timer/interaction-timer.js +9 -12
- package/dist/esm/common/url/canonicalize-url.js +27 -0
- package/dist/esm/common/url/canonicalize-url.test.js +38 -0
- package/dist/esm/common/url/clean-url.js +10 -3
- package/dist/esm/common/url/protocol.test.js +0 -1
- package/dist/esm/common/util/feature-flags.js +2 -1
- package/dist/esm/common/util/global-scope.js +1 -0
- package/dist/esm/common/util/submit-data.js +57 -18
- package/dist/esm/common/wrap/wrap-fetch.js +1 -2
- package/dist/esm/common/wrap/wrap-function.js +1 -2
- package/dist/esm/common/wrap/wrap-promise.js +1 -1
- package/dist/esm/features/ajax/aggregate/index.js +2 -2
- package/dist/esm/features/ajax/instrument/index.js +1 -1
- package/dist/esm/features/jserrors/aggregate/canonical-function-name.js +12 -4
- package/dist/esm/features/jserrors/aggregate/compute-stack-trace.js +93 -10
- package/dist/esm/features/jserrors/aggregate/compute-stack-trace.test.js +149 -25
- package/dist/esm/features/jserrors/aggregate/index.js +30 -48
- package/dist/esm/features/jserrors/instrument/index.js +0 -1
- package/dist/esm/features/metrics/aggregate/framework-detection.js +61 -0
- package/dist/esm/features/metrics/aggregate/framework-detection.test.js +133 -0
- package/dist/esm/features/metrics/aggregate/index.js +7 -3
- package/dist/esm/features/metrics/aggregate/polyfill-detection.es5.js +8 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.es5.test.js +15 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.js +47 -0
- package/dist/esm/features/metrics/aggregate/polyfill-detection.test.js +163 -0
- package/dist/esm/features/page_action/aggregate/index.js +2 -2
- package/dist/esm/features/page_view_event/aggregate/index.js +6 -3
- package/dist/esm/features/page_view_timing/aggregate/index.js +2 -2
- package/dist/esm/features/session_replay/aggregate/index.js +327 -0
- package/dist/esm/features/session_replay/constants.js +2 -0
- package/dist/esm/features/session_replay/index.js +12 -0
- package/dist/esm/features/session_replay/instrument/index.js +21 -0
- package/dist/esm/features/session_trace/aggregate/index.js +163 -163
- package/dist/esm/features/session_trace/constants.js +1 -5
- package/dist/esm/features/session_trace/instrument/index.js +24 -66
- package/dist/esm/features/spa/aggregate/index.js +2 -2
- package/dist/esm/features/utils/agent-session.js +1 -2
- package/dist/esm/features/utils/aggregate-base.js +57 -0
- package/dist/esm/features/utils/feature-base.js +1 -32
- package/dist/esm/features/utils/handler-cache.js +3 -4
- package/dist/esm/features/utils/instrument-base.js +42 -10
- package/dist/esm/features/utils/{lazy-loader.js → lazy-feature-loader.js} +3 -1
- package/dist/esm/loaders/agent.js +1 -1
- package/dist/esm/loaders/api/apiAsync.js +3 -1
- package/dist/esm/loaders/configure/configure.js +3 -3
- package/dist/esm/loaders/features/featureDependencies.js +0 -11
- package/dist/esm/loaders/features/features.js +3 -1
- package/dist/esm/loaders/micro-agent.js +6 -6
- package/dist/types/common/config/state/configurable.d.ts +1 -3
- package/dist/types/common/config/state/configurable.d.ts.map +1 -1
- package/dist/types/common/config/state/init.d.ts.map +1 -1
- package/dist/types/common/config/state/runtime.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest-scheduler.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest.d.ts +37 -34
- package/dist/types/common/harvest/harvest.d.ts.map +1 -1
- package/dist/types/common/session/session-entity.d.ts +6 -3
- package/dist/types/common/session/session-entity.d.ts.map +1 -1
- package/dist/types/common/timer/interaction-timer.d.ts +2 -1
- package/dist/types/common/timer/interaction-timer.d.ts.map +1 -1
- package/dist/types/common/url/canonicalize-url.d.ts +9 -0
- package/dist/types/common/url/canonicalize-url.d.ts.map +1 -0
- package/dist/types/common/url/clean-url.d.ts +7 -1
- package/dist/types/common/url/clean-url.d.ts.map +1 -1
- package/dist/types/common/util/feature-flags.d.ts.map +1 -1
- package/dist/types/common/util/global-scope.d.ts +1 -0
- package/dist/types/common/util/global-scope.d.ts.map +1 -1
- package/dist/types/common/util/submit-data.d.ts +40 -14
- package/dist/types/common/util/submit-data.d.ts.map +1 -1
- package/dist/types/common/wrap/wrap-fetch.d.ts.map +1 -1
- package/dist/types/common/wrap/wrap-function.d.ts.map +1 -1
- package/dist/types/features/ajax/aggregate/index.d.ts +2 -2
- package/dist/types/features/ajax/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/canonical-function-name.d.ts +8 -1
- package/dist/types/features/jserrors/aggregate/canonical-function-name.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/compute-stack-trace.d.ts +48 -19
- package/dist/types/features/jserrors/aggregate/compute-stack-trace.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts +14 -5
- package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/instrument/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/framework-detection.d.ts.map +1 -0
- package/dist/types/features/metrics/aggregate/index.d.ts +2 -2
- package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/polyfill-detection.d.ts +6 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.d.ts.map +1 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.es5.d.ts +7 -0
- package/dist/types/features/metrics/aggregate/polyfill-detection.es5.d.ts.map +1 -0
- package/dist/types/features/page_action/aggregate/index.d.ts +3 -3
- package/dist/types/features/page_action/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/page_view_event/aggregate/index.d.ts +2 -2
- package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/page_view_timing/aggregate/index.d.ts +2 -2
- package/dist/types/features/page_view_timing/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/aggregate/index.d.ts +96 -0
- package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -0
- package/dist/types/features/session_replay/constants.d.ts +2 -0
- package/dist/types/features/session_replay/constants.d.ts.map +1 -0
- package/dist/types/features/session_replay/index.d.ts +2 -0
- package/dist/types/features/session_replay/index.d.ts.map +1 -0
- package/dist/types/features/session_replay/instrument/index.d.ts +6 -0
- package/dist/types/features/session_replay/instrument/index.d.ts.map +1 -0
- package/dist/types/features/session_trace/aggregate/index.d.ts +8 -57
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/constants.d.ts +0 -3
- package/dist/types/features/session_trace/constants.d.ts.map +1 -1
- package/dist/types/features/session_trace/instrument/index.d.ts +1 -3
- package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts +2 -2
- package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/utils/agent-session.d.ts.map +1 -1
- package/dist/types/features/utils/aggregate-base.d.ts +11 -0
- package/dist/types/features/utils/aggregate-base.d.ts.map +1 -0
- package/dist/types/features/utils/feature-base.d.ts +0 -5
- package/dist/types/features/utils/feature-base.d.ts.map +1 -1
- package/dist/types/features/utils/handler-cache.d.ts.map +1 -1
- package/dist/types/features/utils/instrument-base.d.ts +3 -1
- package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
- package/dist/types/features/utils/{lazy-loader.d.ts → lazy-feature-loader.d.ts} +2 -2
- package/dist/types/features/utils/lazy-feature-loader.d.ts.map +1 -0
- package/dist/types/loaders/configure/configure.d.ts.map +1 -1
- package/dist/types/loaders/features/featureDependencies.d.ts +0 -1
- package/dist/types/loaders/features/featureDependencies.d.ts.map +1 -1
- package/dist/types/loaders/features/features.d.ts +1 -0
- package/dist/types/loaders/features/features.d.ts.map +1 -1
- package/package.json +31 -22
- package/src/cdn/polyfills.js +4 -1
- package/src/common/config/state/configurable.js +18 -24
- package/src/common/config/state/info.js +2 -2
- package/src/common/config/state/init.js +62 -28
- package/src/common/config/state/loader-config.js +2 -2
- package/src/common/config/state/runtime.js +2 -4
- package/src/common/drain/drain.js +1 -1
- package/src/common/harvest/harvest-scheduler.js +35 -10
- package/src/common/harvest/harvest.js +73 -50
- package/src/common/session/session-entity.js +34 -23
- package/src/common/session/session-entity.test.js +57 -51
- package/src/common/timer/interaction-timer.js +9 -12
- package/src/common/url/canonicalize-url.js +28 -0
- package/src/common/url/canonicalize-url.test.js +34 -0
- package/src/common/url/clean-url.js +10 -3
- package/src/common/url/protocol.test.js +0 -1
- package/src/common/util/feature-flags.js +2 -2
- package/src/common/util/global-scope.js +2 -0
- package/src/common/util/submit-data.js +28 -17
- package/src/common/wrap/wrap-fetch.js +1 -2
- package/src/common/wrap/wrap-function.js +1 -2
- package/src/common/wrap/wrap-promise.js +1 -1
- package/src/features/ajax/aggregate/index.js +2 -2
- package/src/features/ajax/instrument/index.js +1 -1
- package/src/features/jserrors/aggregate/canonical-function-name.js +12 -4
- package/src/features/jserrors/aggregate/compute-stack-trace.js +85 -11
- package/src/features/jserrors/aggregate/compute-stack-trace.test.js +141 -24
- package/src/features/jserrors/aggregate/index.js +28 -52
- package/src/features/jserrors/instrument/index.js +0 -1
- package/src/features/metrics/aggregate/framework-detection.js +73 -0
- package/src/features/metrics/aggregate/framework-detection.test.js +201 -0
- package/src/features/metrics/aggregate/index.js +8 -3
- package/src/features/metrics/aggregate/polyfill-detection.es5.js +9 -0
- package/src/features/metrics/aggregate/polyfill-detection.es5.test.js +16 -0
- package/src/features/metrics/aggregate/polyfill-detection.js +48 -0
- package/src/features/metrics/aggregate/polyfill-detection.test.js +163 -0
- package/src/features/page_action/aggregate/index.js +2 -2
- package/src/features/page_view_event/aggregate/index.js +5 -5
- package/src/features/page_view_timing/aggregate/index.js +2 -2
- package/src/features/session_replay/aggregate/index.js +314 -0
- package/src/features/session_replay/constants.js +3 -0
- package/src/features/session_replay/index.js +12 -0
- package/src/features/session_replay/instrument/index.js +22 -0
- package/src/features/session_trace/aggregate/index.js +148 -188
- package/src/features/session_trace/constants.js +0 -4
- package/src/features/session_trace/instrument/index.js +17 -69
- package/src/features/spa/aggregate/index.js +2 -2
- package/src/features/utils/agent-session.js +1 -2
- package/src/features/utils/aggregate-base.js +51 -0
- package/src/features/utils/feature-base.js +1 -31
- package/src/features/utils/handler-cache.js +3 -4
- package/src/features/utils/instrument-base.js +40 -8
- package/src/features/utils/{lazy-loader.js → lazy-feature-loader.js} +3 -1
- package/src/loaders/agent.js +1 -1
- package/src/loaders/api/apiAsync.js +1 -1
- package/src/loaders/configure/configure.js +4 -3
- package/src/loaders/features/featureDependencies.js +0 -12
- package/src/loaders/features/features.js +3 -1
- package/src/loaders/micro-agent.js +4 -4
- package/dist/cjs/common/metrics/framework-detection.js +0 -72
- package/dist/cjs/common/util/user-agent.js +0 -57
- package/dist/cjs/common/window/supports-performance-observer.js +0 -15
- package/dist/esm/common/metrics/framework-detection.js +0 -66
- package/dist/esm/common/util/user-agent.js +0 -48
- package/dist/esm/common/window/supports-performance-observer.js +0 -9
- package/dist/types/common/metrics/framework-detection.d.ts.map +0 -1
- package/dist/types/common/util/user-agent.d.ts +0 -5
- package/dist/types/common/util/user-agent.d.ts.map +0 -1
- package/dist/types/common/window/supports-performance-observer.d.ts +0 -2
- package/dist/types/common/window/supports-performance-observer.d.ts.map +0 -1
- package/dist/types/features/utils/lazy-loader.d.ts.map +0 -1
- package/src/common/metrics/framework-detection.js +0 -71
- package/src/common/util/user-agent.js +0 -56
- package/src/common/window/supports-performance-observer.js +0 -10
- /package/dist/types/{common/metrics → features/metrics/aggregate}/framework-detection.d.ts +0 -0
|
@@ -1,51 +1,8 @@
|
|
|
1
|
-
export class Aggregate extends
|
|
1
|
+
export class Aggregate extends AggregateBase {
|
|
2
2
|
static featureName: string;
|
|
3
|
-
constructor(agentIdentifier: any, aggregator: any);
|
|
3
|
+
constructor(agentIdentifier: any, aggregator: any, argsObj: any);
|
|
4
|
+
resourceObserver: any;
|
|
4
5
|
ptid: string | undefined;
|
|
5
|
-
ignoredEvents: {
|
|
6
|
-
global: {
|
|
7
|
-
mouseup: boolean;
|
|
8
|
-
mousedown: boolean;
|
|
9
|
-
};
|
|
10
|
-
window: {
|
|
11
|
-
load: boolean;
|
|
12
|
-
pagehide: boolean;
|
|
13
|
-
};
|
|
14
|
-
xhrOriginMissing: {
|
|
15
|
-
ignoreAll: boolean;
|
|
16
|
-
};
|
|
17
|
-
} | undefined;
|
|
18
|
-
toAggregate: {
|
|
19
|
-
typing: number[];
|
|
20
|
-
scrolling: number[];
|
|
21
|
-
mousing: number[];
|
|
22
|
-
touching: number[];
|
|
23
|
-
} | undefined;
|
|
24
|
-
rename: {
|
|
25
|
-
typing: {
|
|
26
|
-
keydown: boolean;
|
|
27
|
-
keyup: boolean;
|
|
28
|
-
keypress: boolean;
|
|
29
|
-
};
|
|
30
|
-
mousing: {
|
|
31
|
-
mousemove: boolean;
|
|
32
|
-
mouseenter: boolean;
|
|
33
|
-
mouseleave: boolean;
|
|
34
|
-
mouseover: boolean;
|
|
35
|
-
mouseout: boolean;
|
|
36
|
-
};
|
|
37
|
-
scrolling: {
|
|
38
|
-
scroll: boolean;
|
|
39
|
-
};
|
|
40
|
-
touching: {
|
|
41
|
-
touchstart: boolean;
|
|
42
|
-
touchmove: boolean;
|
|
43
|
-
touchend: boolean;
|
|
44
|
-
touchcancel: boolean;
|
|
45
|
-
touchenter: boolean;
|
|
46
|
-
touchleave: boolean;
|
|
47
|
-
};
|
|
48
|
-
} | undefined;
|
|
49
6
|
trace: {} | undefined;
|
|
50
7
|
nodeCount: number | undefined;
|
|
51
8
|
sentTrace: {} | null | undefined;
|
|
@@ -53,9 +10,10 @@ export class Aggregate extends FeatureBase {
|
|
|
53
10
|
maxNodesPerHarvest: any;
|
|
54
11
|
laststart: number | undefined;
|
|
55
12
|
processPVT(name: any, value: any, attrs: any): void;
|
|
56
|
-
storeTiming(
|
|
13
|
+
storeTiming(timingEntry: any): void;
|
|
57
14
|
storeTimer(target: any, start: any, end: any, type: any): void;
|
|
58
|
-
storeEvent(currentEvent: any, target: any, start: any, end: any):
|
|
15
|
+
storeEvent(currentEvent: any, target: any, start: any, end: any): void;
|
|
16
|
+
shouldIgnoreEvent(event: any, target: any): boolean;
|
|
59
17
|
evtName(type: any): any;
|
|
60
18
|
evtOrigin(t: any, target: any): string;
|
|
61
19
|
storeHist(path: any, old: any, time: any): void;
|
|
@@ -63,15 +21,8 @@ export class Aggregate extends FeatureBase {
|
|
|
63
21
|
storeErrorAgg(type: any, name: any, params: any, metrics: any): void;
|
|
64
22
|
storeXhrAgg(type: any, name: any, params: any, metrics: any): void;
|
|
65
23
|
storeSTN(stn: any): void;
|
|
66
|
-
mergeSTNs(key: any, nodes: any): void;
|
|
67
24
|
takeSTNs(retry: any): {};
|
|
68
|
-
|
|
69
|
-
smearEvtsByOrigin(name: any): (byOrigin: any, evt: any) => any;
|
|
70
|
-
val(key: any, value: any): any;
|
|
71
|
-
flatten(a: any, b: any): any;
|
|
72
|
-
hasFID(name: any, attrs: any): boolean;
|
|
73
|
-
trivial(node: any): boolean;
|
|
74
|
-
shouldIgnoreEvent(event: any, target: any): boolean;
|
|
25
|
+
smearEvtsByOrigin(name: any): (byOrigin: any, evtNode: any) => any;
|
|
75
26
|
}
|
|
76
|
-
import {
|
|
27
|
+
import { AggregateBase } from '../../utils/aggregate-base';
|
|
77
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/aggregate/index.js"],"names":[],"mappings":"AA+BA;IACE,2BAAiC;IACjC,iEAyEC;IAnEC,sBAAiD;IACjD,yBAAc;IACd,sBAAe;IACf,8BAAkB;IAClB,iCAAqB;IACrB,wBAA0G;IAC1G,wBAA4G;IAC5G,8BAAkB;IA+DpB,oDAOC;IAGD,oCAwBC;IAGD,+DASC;IAGD,uEAkBC;IAED,oDAMC;IAED,wBAwBC;IAED,uCAuBC;IAGD,gDASC;IAGD,qCAkBC;IAGD,qEAUC;IAGD,mEAUC;IAGD,yBAOC;IAGD,yBAgCC;IAED,mEA8BC;CACF;8BAvW6B,4BAA4B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const FEATURE_NAME: string;
|
|
2
|
-
export const RESOURCE_TIMING_BUFFER_FULL: "resourcetimingbufferfull";
|
|
3
2
|
export const BST_RESOURCE: "bstResource";
|
|
4
3
|
export const RESOURCE: "resource";
|
|
5
4
|
export const START: "-start";
|
|
@@ -8,6 +7,4 @@ export const FN_START: string;
|
|
|
8
7
|
export const FN_END: string;
|
|
9
8
|
export const BST_TIMER: "bstTimer";
|
|
10
9
|
export const PUSH_STATE: "pushState";
|
|
11
|
-
export const ORIG_EVENT: any;
|
|
12
|
-
export const ADD_EVENT_LISTENER: "addEventListener";
|
|
13
10
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/session_trace/constants.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/session_trace/constants.js"],"names":[],"mappings":"AAEA,kCAAsD;AACtD,yCAAyC;AACzC,kCAAkC;AAClC,6BAA6B;AAC7B,yBAAyB;AACzB,8BAAoC;AACpC,4BAAgC;AAChC,mCAAmC;AACnC,qCAAqC"}
|
|
@@ -3,9 +3,7 @@ export class Instrument extends InstrumentBase {
|
|
|
3
3
|
constructor(agentIdentifier: any, aggregator: any, auto?: boolean);
|
|
4
4
|
timerEE: Object | undefined;
|
|
5
5
|
rafEE: Object | undefined;
|
|
6
|
-
|
|
7
|
-
onResourceTimingBufferFull(evt: any): void;
|
|
8
|
-
#private;
|
|
6
|
+
eventsEE: Object | undefined;
|
|
9
7
|
}
|
|
10
8
|
import { InstrumentBase } from '../../utils/instrument-base';
|
|
11
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/instrument/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_trace/instrument/index.js"],"names":[],"mappings":"AAgBA;IACE,2BAAiC;IACjC,mEAuDC;IAlDC,4BAA0C;IAC1C,0BAAsC;IAEtC,6BAA4C;CAgD/C;+BAnE8B,6BAA6B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class Aggregate extends
|
|
1
|
+
export class Aggregate extends AggregateBase {
|
|
2
2
|
static featureName: string;
|
|
3
3
|
constructor(agentIdentifier: any, aggregator: any);
|
|
4
4
|
state: {
|
|
@@ -20,6 +20,6 @@ export class Aggregate extends FeatureBase {
|
|
|
20
20
|
};
|
|
21
21
|
serializer: Serializer;
|
|
22
22
|
}
|
|
23
|
-
import {
|
|
23
|
+
import { AggregateBase } from '../../utils/aggregate-base';
|
|
24
24
|
import { Serializer } from './serializer';
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IACjC,mDAmsBC;IAhsBC;;;;;;;;;;;;;;;;MAgBC;IAED,uBAAsC;CA+qBzC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"AA2BA;IACE,2BAAiC;IACjC,mDAmsBC;IAhsBC;;;;;;;;;;;;;;;;MAgBC;IAED,uBAAsC;CA+qBzC;8BA5sB6B,4BAA4B;2BAL/B,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/agent-session.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-session.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/agent-session.js"],"names":[],"mappings":"AAUA,6DAwDC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class AggregateBase extends FeatureBase {
|
|
2
|
+
constructor(...args: any[]);
|
|
3
|
+
waitForFlags(flagNames?: any[]): Promise<any[]>;
|
|
4
|
+
/**
|
|
5
|
+
* Checks for additional `jsAttributes` items to support backward compatibility with implementations of the agent where
|
|
6
|
+
* loader configurations may appear after the loader code is executed.
|
|
7
|
+
*/
|
|
8
|
+
checkConfiguration(): void;
|
|
9
|
+
}
|
|
10
|
+
import { FeatureBase } from './feature-base';
|
|
11
|
+
//# sourceMappingURL=aggregate-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/aggregate-base.js"],"names":[],"mappings":"AAMA;IACE,4BAGC;IAED,gDAUC;IAED;;;OAGG;IACH,2BAqBC;CACF;4BAjD2B,gBAAgB"}
|
|
@@ -14,10 +14,5 @@ export class FeatureBase {
|
|
|
14
14
|
* @type {boolean}
|
|
15
15
|
*/
|
|
16
16
|
blocked: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Checks for additional `jsAttributes` items to support backward compatibility with implementations of the agent where
|
|
19
|
-
* loader configurations may appear after the loader code is executed.
|
|
20
|
-
*/
|
|
21
|
-
checkConfiguration(): void;
|
|
22
17
|
}
|
|
23
18
|
//# sourceMappingURL=feature-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"AAGA;IACE,qEAeC;IAdC,qBAAqB;IACrB,iBADW,MAAM,CACqB;IACtC,yBAAyB;IACzB,uBAA4B;IAC5B,2BAA2B;IAC3B,iBAAmF;IACnF,qBAAqB;IACrB,aADW,MAAM,CACa;IAC9B;;;;OAIG;IACH,SAFU,OAAO,CAEG;CAEvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-cache.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/handler-cache.js"],"names":[],"mappings":"AACA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"handler-cache.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/handler-cache.js"],"names":[],"mappings":"AACA;;GAEG;AACH;IA6BE;;;;SAIK;IACL,2BAFe,IAAI,CAMlB;IAED;;;;;;;SAOK;IACL,iBAFa,OAAO,QAOnB;;CACF"}
|
|
@@ -20,8 +20,10 @@ export class InstrumentBase extends FeatureBase {
|
|
|
20
20
|
/**
|
|
21
21
|
* Lazy-load the latter part of the feature: its aggregator. This method is called by the first part of the feature
|
|
22
22
|
* (the instrumentation) when instrumentation is complete.
|
|
23
|
+
* @param {Object} [argsObjFromInstrument] - any values or references to pass down to aggregate
|
|
24
|
+
* @returns void
|
|
23
25
|
*/
|
|
24
|
-
importAggregator(): void;
|
|
26
|
+
importAggregator(argsObjFromInstrument?: Object | undefined): void;
|
|
25
27
|
}
|
|
26
28
|
import { FeatureBase } from './feature-base';
|
|
27
29
|
//# sourceMappingURL=instrument-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/instrument-base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrument-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/instrument-base.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH;IACE;;;;;;;;OAQG;IACH,6BAPW,MAAM,uCAEN,MAAM,8BAchB;IAPC,uBAA0B;IAC1B,cAAgB;IAEhB,8IAA8I;IAC9I,cADW,WAAW,SAAS,CACd;IAKnB;;;;;OAKG;IACH,mEAyCC;CACF;4BAhF2B,gBAAgB"}
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* @param featurePart Name of the feature part to load; should be either instrument or aggregate
|
|
10
10
|
* @returns {Promise<InstrumentBase|FeatureBase|null>}
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
//# sourceMappingURL=lazy-loader.d.ts.map
|
|
12
|
+
export function lazyFeatureLoader(featureName: any, featurePart: any): Promise<InstrumentBase | FeatureBase | null>;
|
|
13
|
+
//# sourceMappingURL=lazy-feature-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-feature-loader.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/lazy-feature-loader.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,uEAFa,QAAQ,+BAA2B,IAAI,CAAC,CA2BpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AAMA;;;;;;;;
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/loaders/configure/configure.js"],"names":[],"mappings":"AAMA;;;;;;;;EA4BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureDependencies.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/featureDependencies.js"],"names":[],"mappings":"AAEA,kEAWC
|
|
1
|
+
{"version":3,"file":"featureDependencies.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/featureDependencies.js"],"names":[],"mappings":"AAEA,kEAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/features.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/features.js"],"names":[],"mappings":";;;;;;;;;;;AAYA;;;GAGG;AACH;;EAUC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/browser-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.233.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
|
|
6
6
|
"description": "Tests for the New Relic JavaScript agent",
|
|
@@ -87,16 +87,17 @@
|
|
|
87
87
|
"node": ">=12.17.0 < 13.0.0 || >=13.7.0"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
|
-
"wdio": "node tools/wdio/bin/cli.js",
|
|
90
|
+
"wdio": "node --max-old-space-size=8192 tools/wdio/bin/cli.js",
|
|
91
91
|
"start": "npm-run-all --parallel cdn:watch test-server",
|
|
92
92
|
"test": "jest",
|
|
93
93
|
"test:watch": "jest --watch",
|
|
94
94
|
"test:coverage": "jest --coverage",
|
|
95
95
|
"build:all": "npm run cdn:build:local && npm run build:npm && npm run tools:test-builds",
|
|
96
96
|
"build:npm": "npm run npm:build:esm && npm run npm:build:cjs && npm run npm:build:types && npm run npm:pack",
|
|
97
|
+
"build:browser-tests": "npm --prefix ./tools/test-builds/browser-tests run build",
|
|
97
98
|
"lint": "eslint -c .eslintrc.js --ext .js,.cjs,.mjs .",
|
|
98
99
|
"lint:fix": "npm run lint -- --fix",
|
|
99
|
-
"test-
|
|
100
|
+
"test-jil": "tools/jil/bin/cli.js",
|
|
100
101
|
"ci-build": "npm ci --cache ./.npm",
|
|
101
102
|
"build-tar": "npm run ci-build && tar czf ./build/browser-agent.tar.gz --exclude=.git --exclude=.npm --exclude=build/browser-agent.tar.gz .",
|
|
102
103
|
"watch": "jung -D '\\.npm|.git|node_modules|build|tools|tests' --run -- npm run build:all",
|
|
@@ -116,8 +117,8 @@
|
|
|
116
117
|
"cdn:watch:extension": "jung -r ./src -F '.*\\.test\\.js' --run -- npm run cdn:build:extension",
|
|
117
118
|
"cdn:webpack": "npx webpack --progress --config ./webpack.config.js",
|
|
118
119
|
"packages:bundle": "webpack -c tools/jil/webpack.modular.js",
|
|
119
|
-
"test-server": "node ./tools/
|
|
120
|
-
"sauce:connect": "node ./tools/
|
|
120
|
+
"test-server": "node ./tools/wdio/bin/server",
|
|
121
|
+
"sauce:connect": "node ./tools/saucelabs/bin.mjs",
|
|
121
122
|
"sauce:get-browsers": "node ./tools/browsers-lists/sauce-browsers.mjs",
|
|
122
123
|
"tools:test-builds": "npm --prefix ./tools/test-builds run build-all",
|
|
123
124
|
"third-party-updates": "oss third-party manifest --includeOptDeps && oss third-party notices --includeOptDeps",
|
|
@@ -136,7 +137,8 @@
|
|
|
136
137
|
},
|
|
137
138
|
"dependencies": {
|
|
138
139
|
"core-js": "^3.26.0",
|
|
139
|
-
"
|
|
140
|
+
"fflate": "^0.7.4",
|
|
141
|
+
"rrweb": "^2.0.0-alpha.8",
|
|
140
142
|
"web-vitals": "^3.1.0"
|
|
141
143
|
},
|
|
142
144
|
"devDependencies": {
|
|
@@ -146,19 +148,21 @@
|
|
|
146
148
|
"@babel/eslint-parser": "^7.19.1",
|
|
147
149
|
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
|
148
150
|
"@babel/preset-env": "^7.20.2",
|
|
151
|
+
"@babel/register": "^7.21.0",
|
|
149
152
|
"@faker-js/faker": "^7.6.0",
|
|
150
|
-
"@fastify/
|
|
151
|
-
"@fastify/
|
|
152
|
-
"@fastify/
|
|
153
|
+
"@fastify/compress": "^6.2.1",
|
|
154
|
+
"@fastify/cors": "^8.2.1",
|
|
155
|
+
"@fastify/multipart": "^7.6.0",
|
|
156
|
+
"@fastify/static": "^6.10.1",
|
|
153
157
|
"@newrelic/newrelic-oss-cli": "^0.1.2",
|
|
154
158
|
"@newrelic/nr-querypack": "https://git@github.com/newrelic/nr-querypack",
|
|
155
159
|
"@octokit/rest": "^19.0.7",
|
|
156
|
-
"@wdio/cli": "^8.
|
|
157
|
-
"@wdio/local-runner": "^8.
|
|
158
|
-
"@wdio/mocha-framework": "^8.
|
|
159
|
-
"@wdio/sauce-service": "^8.
|
|
160
|
-
"@wdio/selenium-standalone-service": "^8.
|
|
161
|
-
"@wdio/spec-reporter": "^8.
|
|
160
|
+
"@wdio/cli": "^8.10.5",
|
|
161
|
+
"@wdio/local-runner": "^8.10.5",
|
|
162
|
+
"@wdio/mocha-framework": "^8.10.4",
|
|
163
|
+
"@wdio/sauce-service": "^8.10.5",
|
|
164
|
+
"@wdio/selenium-standalone-service": "^8.10.4",
|
|
165
|
+
"@wdio/spec-reporter": "^8.10.5",
|
|
162
166
|
"aws-sdk": "^2.894.0",
|
|
163
167
|
"babel-jest": "^29.4.1",
|
|
164
168
|
"babel-loader": "^8.2.5",
|
|
@@ -168,7 +172,7 @@
|
|
|
168
172
|
"chalk": "^5.1.2",
|
|
169
173
|
"charm": "^1.0.1",
|
|
170
174
|
"concat-stream": "^1.5.1",
|
|
171
|
-
"deepmerge-ts": "^
|
|
175
|
+
"deepmerge-ts": "^5.1.0",
|
|
172
176
|
"defined": "^1.0.0",
|
|
173
177
|
"dotenv-webpack": "^8.0.1",
|
|
174
178
|
"eslint": "^8.34.0",
|
|
@@ -177,17 +181,18 @@
|
|
|
177
181
|
"eslint-plugin-n": "^15.6.1",
|
|
178
182
|
"eslint-plugin-promise": "^6.1.1",
|
|
179
183
|
"eslint-plugin-sonarjs": "^0.19.0",
|
|
180
|
-
"fastify": "^4.
|
|
181
|
-
"fastify-plugin": "^4.
|
|
182
|
-
"filesize": "^10.0.
|
|
184
|
+
"fastify": "^4.17.0",
|
|
185
|
+
"fastify-plugin": "^4.5.0",
|
|
186
|
+
"filesize": "^10.0.7",
|
|
183
187
|
"fs-extra": "^11.1.0",
|
|
184
188
|
"function-bind": "^1.1.1",
|
|
185
|
-
"glob": "^
|
|
189
|
+
"glob": "^10.2.5",
|
|
186
190
|
"gzip-size": "^7.0.0",
|
|
187
191
|
"html-webpack-plugin": "^5.5.0",
|
|
188
192
|
"husky": "^8.0.0",
|
|
189
193
|
"jest": "^28.1.1",
|
|
190
194
|
"jest-environment-jsdom": "28.1.1",
|
|
195
|
+
"jest-extended": "^3.2.4",
|
|
191
196
|
"jquery": "1.11.3",
|
|
192
197
|
"jung": "^2.1.0",
|
|
193
198
|
"just-debounce": "^1.0.0",
|
|
@@ -197,13 +202,16 @@
|
|
|
197
202
|
"npm-run-all": "^4.1.5",
|
|
198
203
|
"object-inspect": "^1.5.0",
|
|
199
204
|
"octokit": "^2.0.14",
|
|
205
|
+
"path-browserify": "^1.0.1",
|
|
200
206
|
"preprocessify": "0.0.6",
|
|
207
|
+
"process": "^0.11.10",
|
|
201
208
|
"request": "2.74.0",
|
|
202
209
|
"sauce-connect-launcher": "^1.2.4",
|
|
203
|
-
"saucelabs": "^7.2.
|
|
210
|
+
"saucelabs": "^7.2.1",
|
|
204
211
|
"semver": "^5.3.0",
|
|
205
212
|
"serialize-anything": "^1.2.3",
|
|
206
|
-
"sinon": "^
|
|
213
|
+
"sinon": "^2.4.1",
|
|
214
|
+
"stream-browserify": "^3.0.0",
|
|
207
215
|
"tap-parser": "^1.2.2",
|
|
208
216
|
"tape": "^4.8.0",
|
|
209
217
|
"through": "^2.3.8",
|
|
@@ -215,6 +223,7 @@
|
|
|
215
223
|
"webpack": "^5.74.0",
|
|
216
224
|
"webpack-bundle-analyzer": "^4.7.0",
|
|
217
225
|
"webpack-cli": "^4.10.0",
|
|
226
|
+
"webpack-stream": "^7.0.0",
|
|
218
227
|
"yargs": "^17.6.2"
|
|
219
228
|
},
|
|
220
229
|
"files": [
|
package/src/cdn/polyfills.js
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import 'core-js/stable/promise'
|
|
7
7
|
import 'core-js/stable/array/includes'
|
|
8
|
-
import 'core-js/stable/array/from'
|
|
9
8
|
import 'core-js/stable/array/find'
|
|
9
|
+
import 'core-js/stable/array/flat'
|
|
10
|
+
import 'core-js/stable/array/flat-map'
|
|
11
|
+
import 'core-js/stable/array/from'
|
|
10
12
|
import 'core-js/stable/array/some'
|
|
11
13
|
import 'core-js/stable/object/assign'
|
|
12
14
|
import 'core-js/stable/object/entries'
|
|
@@ -15,3 +17,4 @@ import 'core-js/stable/map'
|
|
|
15
17
|
import 'core-js/stable/reflect'
|
|
16
18
|
import 'core-js/stable/set'
|
|
17
19
|
import 'core-js/stable/weak-set'
|
|
20
|
+
import 'core-js/stable/object/get-own-property-descriptors'
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import { getFrozenAttributes } from '../../../loaders/features/featureDependencies'
|
|
2
1
|
import { warn } from '../../util/console'
|
|
3
2
|
|
|
4
|
-
export
|
|
5
|
-
constructor (obj, model) {
|
|
6
|
-
Object.assign(this, setValues(obj, model))
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function setValues (obj, model) {
|
|
11
|
-
const state = {}
|
|
3
|
+
export function getModeledObject (obj, model) {
|
|
12
4
|
try {
|
|
13
|
-
if (!obj || typeof obj !== 'object') return warn('
|
|
5
|
+
if (!obj || typeof obj !== 'object') return warn('Setting a Configurable requires an object as input')
|
|
14
6
|
if (!model || typeof model !== 'object') return warn('Setting a Configurable requires a model to set its initial properties')
|
|
15
|
-
|
|
16
|
-
Object.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
// allow getters and setters to pass from model to target
|
|
8
|
+
const output = Object.create(
|
|
9
|
+
Object.getPrototypeOf(model),
|
|
10
|
+
Object.getOwnPropertyDescriptors(model)
|
|
11
|
+
)
|
|
12
|
+
const target = Object.keys(output).length === 0 ? obj : output
|
|
13
|
+
for (let key in target) {
|
|
14
|
+
if (obj[key] !== undefined) {
|
|
15
|
+
try {
|
|
16
|
+
if (typeof obj[key] === 'object' && typeof model[key] === 'object') output[key] = getModeledObject(obj[key], model[key])
|
|
17
|
+
else output[key] = obj[key]
|
|
18
|
+
} catch (e) {
|
|
19
|
+
warn('An error occurred while setting a property of a Configurable', e)
|
|
20
|
+
}
|
|
26
21
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return state
|
|
22
|
+
}
|
|
23
|
+
return output
|
|
30
24
|
} catch (err) {
|
|
31
25
|
warn('An error occured while setting a Configurable', err)
|
|
32
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaults as nrDefaults, gosNREUMInitializedAgents } from '../../window/nreum'
|
|
2
|
-
import {
|
|
2
|
+
import { getModeledObject } from './configurable'
|
|
3
3
|
|
|
4
4
|
const model = {
|
|
5
5
|
// preset defaults
|
|
@@ -44,6 +44,6 @@ export function getInfo (id) {
|
|
|
44
44
|
|
|
45
45
|
export function setInfo (id, obj) {
|
|
46
46
|
if (!id) throw new Error('All info objects require an agent identifier!')
|
|
47
|
-
_cache[id] =
|
|
47
|
+
_cache[id] = getModeledObject(obj, model)
|
|
48
48
|
gosNREUMInitializedAgents(id, _cache[id], 'info')
|
|
49
49
|
}
|
|
@@ -1,34 +1,68 @@
|
|
|
1
1
|
|
|
2
2
|
import { DEFAULT_EXPIRES_MS, DEFAULT_INACTIVE_MS } from '../../session/constants'
|
|
3
|
-
import { globalScope } from '../../util/global-scope'
|
|
4
3
|
import { gosNREUMInitializedAgents } from '../../window/nreum'
|
|
5
|
-
import {
|
|
4
|
+
import { getModeledObject } from './configurable'
|
|
6
5
|
|
|
7
|
-
const model = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
const model = () => {
|
|
7
|
+
const hiddenState = {
|
|
8
|
+
blockSelector: '[data-nr-block]',
|
|
9
|
+
maskInputOptions: { password: true }
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
allow_bfcache: true, // *cli - temporary feature flag for BFCache work
|
|
13
|
+
privacy: { cookies_enabled: true }, // *cli - per discussion, default should be true
|
|
14
|
+
ajax: { deny_list: undefined, enabled: true, harvestTimeSeconds: 10 },
|
|
15
|
+
distributed_tracing: {
|
|
16
|
+
enabled: undefined,
|
|
17
|
+
exclude_newrelic_header: undefined,
|
|
18
|
+
cors_use_newrelic_header: undefined,
|
|
19
|
+
cors_use_tracecontext_headers: undefined,
|
|
20
|
+
allowed_origins: undefined
|
|
21
|
+
},
|
|
22
|
+
session: {
|
|
23
|
+
domain: undefined, // used by first party cookies to set the top-level domain
|
|
24
|
+
expiresMs: DEFAULT_EXPIRES_MS,
|
|
25
|
+
inactiveMs: DEFAULT_INACTIVE_MS
|
|
26
|
+
},
|
|
27
|
+
ssl: undefined,
|
|
28
|
+
obfuscate: undefined,
|
|
29
|
+
jserrors: { enabled: true, harvestTimeSeconds: 10 },
|
|
30
|
+
metrics: { enabled: true },
|
|
31
|
+
page_action: { enabled: true, harvestTimeSeconds: 30 },
|
|
32
|
+
page_view_event: { enabled: true },
|
|
33
|
+
page_view_timing: { enabled: true, harvestTimeSeconds: 30, long_task: false },
|
|
34
|
+
session_trace: { enabled: true, harvestTimeSeconds: 10 },
|
|
35
|
+
session_replay: {
|
|
36
|
+
// feature settings
|
|
37
|
+
enabled: true,
|
|
38
|
+
harvestTimeSeconds: 60,
|
|
39
|
+
sampleRate: 0.1,
|
|
40
|
+
errorSampleRate: 0.1,
|
|
41
|
+
// recording config settings
|
|
42
|
+
maskTextSelector: '*',
|
|
43
|
+
maskAllInputs: true,
|
|
44
|
+
// these properties only have getters because they are enforcable constants and should error if someone tries to override them
|
|
45
|
+
get blockClass () { return 'nr-block' },
|
|
46
|
+
get ignoreClass () { return 'nr-ignore' },
|
|
47
|
+
get maskTextClass () { return 'nr-mask' },
|
|
48
|
+
// props with a getter and setter are used to extend enforcable constants with customer input
|
|
49
|
+
// we must preserve data-nr-block no matter what else the customer sets
|
|
50
|
+
get blockSelector () {
|
|
51
|
+
return hiddenState.blockSelector
|
|
52
|
+
},
|
|
53
|
+
set blockSelector (val) {
|
|
54
|
+
hiddenState.blockSelector += `,${val}`
|
|
55
|
+
},
|
|
56
|
+
// password: must always be present and true no matter what customer sets
|
|
57
|
+
get maskInputOptions () {
|
|
58
|
+
return hiddenState.maskInputOptions
|
|
59
|
+
},
|
|
60
|
+
set maskInputOptions (val) {
|
|
61
|
+
hiddenState.maskInputOptions = { ...val, password: true }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
spa: { enabled: true, harvestTimeSeconds: 10 }
|
|
65
|
+
}
|
|
32
66
|
}
|
|
33
67
|
|
|
34
68
|
const _cache = {}
|
|
@@ -41,7 +75,7 @@ export function getConfiguration (id) {
|
|
|
41
75
|
|
|
42
76
|
export function setConfiguration (id, obj) {
|
|
43
77
|
if (!id) throw new Error('All configuration objects require an agent identifier!')
|
|
44
|
-
_cache[id] =
|
|
78
|
+
_cache[id] = getModeledObject(obj, model())
|
|
45
79
|
gosNREUMInitializedAgents(id, _cache[id], 'config')
|
|
46
80
|
}
|
|
47
81
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gosNREUMInitializedAgents } from '../../window/nreum'
|
|
2
|
-
import {
|
|
2
|
+
import { getModeledObject } from './configurable'
|
|
3
3
|
|
|
4
4
|
const model = {
|
|
5
5
|
accountID: undefined,
|
|
@@ -20,6 +20,6 @@ export function getLoaderConfig (id) {
|
|
|
20
20
|
|
|
21
21
|
export function setLoaderConfig (id, obj) {
|
|
22
22
|
if (!id) throw new Error('All loader-config objects require an agent identifier!')
|
|
23
|
-
_cache[id] =
|
|
23
|
+
_cache[id] = getModeledObject(obj, model)
|
|
24
24
|
gosNREUMInitializedAgents(id, _cache[id], 'loader_config')
|
|
25
25
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Configurable } from './configurable'
|
|
1
|
+
import { getModeledObject } from './configurable'
|
|
3
2
|
import { gosNREUMInitializedAgents } from '../../window/nreum'
|
|
4
3
|
import { globalScope } from '../../util/global-scope'
|
|
5
4
|
import { BUILD_ENV, DIST_METHOD, VERSION } from '../../constants/env'
|
|
@@ -23,7 +22,6 @@ const model = {
|
|
|
23
22
|
releaseIds: {},
|
|
24
23
|
session: undefined,
|
|
25
24
|
xhrWrappable: typeof globalScope.XMLHttpRequest?.prototype?.addEventListener === 'function',
|
|
26
|
-
userAgent,
|
|
27
25
|
version: VERSION
|
|
28
26
|
}
|
|
29
27
|
|
|
@@ -37,6 +35,6 @@ export function getRuntime (id) {
|
|
|
37
35
|
|
|
38
36
|
export function setRuntime (id, obj) {
|
|
39
37
|
if (!id) throw new Error('All runtime objects require an agent identifier!')
|
|
40
|
-
_cache[id] =
|
|
38
|
+
_cache[id] = getModeledObject(obj, model)
|
|
41
39
|
gosNREUMInitializedAgents(id, _cache[id], 'runtime')
|
|
42
40
|
}
|
|
@@ -55,7 +55,7 @@ export function drain (agentIdentifier = '', featureName = 'feature') {
|
|
|
55
55
|
|
|
56
56
|
// Only when the event-groups for all features are ready to drain (staged) do we execute the drain. This has the effect
|
|
57
57
|
// that the last feature to call drain triggers drain for all features.
|
|
58
|
-
const items =
|
|
58
|
+
const items = [...registry[agentIdentifier]]
|
|
59
59
|
if (items.every(([key, values]) => values.staged)) {
|
|
60
60
|
items.sort((a, b) => a[1].priority - b[1].priority)
|
|
61
61
|
items.forEach(([group]) => {
|