@newrelic/browser-agent 1.288.1 → 1.289.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/CHANGELOG.md +7 -0
- package/dist/cjs/common/config/info.js +7 -17
- package/dist/cjs/common/config/init.js +6 -34
- package/dist/cjs/common/config/loader-config.js +6 -16
- package/dist/cjs/common/config/runtime.js +21 -27
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/event-emitter/contextual-ee.js +1 -2
- package/dist/cjs/common/serialize/bel-serializer.js +1 -3
- package/dist/cjs/common/timing/time-keeper.js +2 -3
- package/dist/cjs/features/ajax/aggregate/index.js +1 -1
- package/dist/cjs/features/ajax/instrument/distributed-tracing.js +10 -26
- package/dist/cjs/features/ajax/instrument/index.js +1 -1
- package/dist/cjs/features/logging/aggregate/index.js +1 -1
- package/dist/cjs/features/page_view_event/aggregate/index.js +2 -2
- package/dist/cjs/features/page_view_timing/aggregate/index.js +1 -1
- package/dist/cjs/features/session_replay/aggregate/index.js +1 -1
- package/dist/cjs/features/session_replay/instrument/index.js +3 -3
- package/dist/cjs/features/session_replay/shared/utils.js +5 -6
- package/dist/cjs/features/session_trace/instrument/index.js +1 -1
- package/dist/cjs/features/soft_navigations/aggregate/ajax-node.js +3 -3
- package/dist/cjs/features/soft_navigations/aggregate/bel-node.js +3 -3
- package/dist/cjs/features/soft_navigations/aggregate/index.js +7 -7
- package/dist/cjs/features/soft_navigations/aggregate/initial-page-load-interaction.js +4 -6
- package/dist/cjs/features/soft_navigations/aggregate/interaction.js +5 -6
- package/dist/cjs/features/spa/aggregate/index.js +1 -1
- package/dist/cjs/features/spa/aggregate/interaction.js +1 -1
- package/dist/cjs/features/spa/aggregate/serializer.js +8 -11
- package/dist/cjs/features/utils/aggregate-base.js +1 -1
- package/dist/cjs/features/utils/feature-gates.js +2 -3
- package/dist/cjs/features/utils/instrument-base.js +4 -4
- package/dist/cjs/loaders/agent.js +1 -1
- package/dist/cjs/loaders/api/api.js +1 -11
- package/dist/cjs/loaders/configure/configure.js +7 -7
- package/dist/cjs/loaders/features/enabled-features.js +2 -6
- package/dist/cjs/loaders/micro-agent.js +1 -1
- package/dist/esm/common/config/info.js +6 -16
- package/dist/esm/common/config/init.js +4 -31
- package/dist/esm/common/config/loader-config.js +4 -14
- package/dist/esm/common/config/runtime.js +19 -25
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/event-emitter/contextual-ee.js +1 -2
- package/dist/esm/common/serialize/bel-serializer.js +1 -3
- package/dist/esm/common/timing/time-keeper.js +2 -3
- package/dist/esm/features/ajax/aggregate/index.js +1 -1
- package/dist/esm/features/ajax/instrument/distributed-tracing.js +10 -26
- package/dist/esm/features/ajax/instrument/index.js +1 -1
- package/dist/esm/features/logging/aggregate/index.js +1 -1
- package/dist/esm/features/page_view_event/aggregate/index.js +2 -2
- package/dist/esm/features/page_view_timing/aggregate/index.js +1 -1
- package/dist/esm/features/session_replay/aggregate/index.js +1 -1
- package/dist/esm/features/session_replay/instrument/index.js +3 -3
- package/dist/esm/features/session_replay/shared/utils.js +5 -6
- package/dist/esm/features/session_trace/instrument/index.js +1 -1
- package/dist/esm/features/soft_navigations/aggregate/ajax-node.js +3 -3
- package/dist/esm/features/soft_navigations/aggregate/bel-node.js +3 -3
- package/dist/esm/features/soft_navigations/aggregate/index.js +7 -7
- package/dist/esm/features/soft_navigations/aggregate/initial-page-load-interaction.js +4 -6
- package/dist/esm/features/soft_navigations/aggregate/interaction.js +5 -6
- package/dist/esm/features/spa/aggregate/index.js +1 -1
- package/dist/esm/features/spa/aggregate/interaction.js +1 -2
- package/dist/esm/features/spa/aggregate/serializer.js +8 -11
- package/dist/esm/features/utils/aggregate-base.js +1 -1
- package/dist/esm/features/utils/feature-gates.js +2 -3
- package/dist/esm/features/utils/instrument-base.js +4 -4
- package/dist/esm/loaders/agent.js +1 -1
- package/dist/esm/loaders/api/api.js +1 -11
- package/dist/esm/loaders/configure/configure.js +10 -10
- package/dist/esm/loaders/features/enabled-features.js +2 -6
- package/dist/esm/loaders/micro-agent.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common/config/info.d.ts +2 -3
- package/dist/types/common/config/info.d.ts.map +1 -1
- package/dist/types/common/config/init.d.ts +1 -3
- package/dist/types/common/config/init.d.ts.map +1 -1
- package/dist/types/common/config/loader-config.d.ts +1 -2
- package/dist/types/common/config/loader-config.d.ts.map +1 -1
- package/dist/types/common/config/runtime.d.ts +1 -2
- package/dist/types/common/config/runtime.d.ts.map +1 -1
- package/dist/types/common/event-emitter/contextual-ee.d.ts.map +1 -1
- package/dist/types/common/serialize/bel-serializer.d.ts +1 -1
- package/dist/types/common/serialize/bel-serializer.d.ts.map +1 -1
- package/dist/types/common/timing/time-keeper.d.ts +1 -1
- package/dist/types/common/timing/time-keeper.d.ts.map +1 -1
- package/dist/types/features/ajax/instrument/distributed-tracing.d.ts +3 -4
- package/dist/types/features/ajax/instrument/distributed-tracing.d.ts.map +1 -1
- package/dist/types/features/ajax/instrument/index.d.ts.map +1 -1
- package/dist/types/features/logging/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/utils.d.ts +2 -2
- package/dist/types/features/session_replay/shared/utils.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/ajax-node.d.ts +1 -1
- package/dist/types/features/soft_navigations/aggregate/ajax-node.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/bel-node.d.ts +3 -2
- package/dist/types/features/soft_navigations/aggregate/bel-node.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/initial-page-load-interaction.d.ts +1 -1
- package/dist/types/features/soft_navigations/aggregate/initial-page-load-interaction.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/interaction.d.ts +1 -1
- package/dist/types/features/soft_navigations/aggregate/interaction.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/interaction.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/serializer.d.ts +4 -2
- package/dist/types/features/spa/aggregate/serializer.d.ts.map +1 -1
- package/dist/types/features/utils/feature-gates.d.ts +1 -1
- package/dist/types/features/utils/feature-gates.d.ts.map +1 -1
- package/dist/types/loaders/api/api.d.ts.map +1 -1
- package/dist/types/loaders/features/enabled-features.d.ts +1 -1
- package/dist/types/loaders/features/enabled-features.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/config/info.js +6 -18
- package/src/common/config/init.js +3 -33
- package/src/common/config/loader-config.js +3 -15
- package/src/common/config/runtime.js +11 -28
- package/src/common/event-emitter/contextual-ee.js +1 -2
- package/src/common/serialize/bel-serializer.js +1 -3
- package/src/common/timing/time-keeper.js +2 -3
- package/src/features/ajax/aggregate/index.js +1 -1
- package/src/features/ajax/instrument/distributed-tracing.js +10 -29
- package/src/features/ajax/instrument/index.js +1 -1
- package/src/features/logging/aggregate/index.js +1 -1
- package/src/features/page_view_event/aggregate/index.js +2 -2
- package/src/features/page_view_timing/aggregate/index.js +1 -1
- package/src/features/session_replay/aggregate/index.js +1 -1
- package/src/features/session_replay/instrument/index.js +3 -3
- package/src/features/session_replay/shared/utils.js +5 -6
- package/src/features/session_trace/instrument/index.js +1 -1
- package/src/features/soft_navigations/aggregate/ajax-node.js +3 -3
- package/src/features/soft_navigations/aggregate/bel-node.js +3 -3
- package/src/features/soft_navigations/aggregate/index.js +7 -7
- package/src/features/soft_navigations/aggregate/initial-page-load-interaction.js +4 -6
- package/src/features/soft_navigations/aggregate/interaction.js +5 -6
- package/src/features/spa/aggregate/index.js +1 -1
- package/src/features/spa/aggregate/interaction.js +1 -2
- package/src/features/spa/aggregate/serializer.js +8 -11
- package/src/features/utils/aggregate-base.js +1 -1
- package/src/features/utils/feature-gates.js +2 -3
- package/src/features/utils/instrument-base.js +4 -4
- package/src/loaders/agent.js +1 -1
- package/src/loaders/api/api.js +3 -5
- package/src/loaders/configure/configure.js +10 -10
- package/src/loaders/features/enabled-features.js +2 -7
- package/src/loaders/micro-agent.js +1 -1
- package/dist/cjs/common/context/shared-context.js +0 -31
- package/dist/esm/common/context/shared-context.js +0 -23
- package/dist/types/common/context/shared-context.d.ts +0 -5
- package/dist/types/common/context/shared-context.d.ts.map +0 -1
- package/src/common/config/__mocks__/info.js +0 -7
- package/src/common/config/__mocks__/init.js +0 -7
- package/src/common/config/__mocks__/loader-config.js +0 -6
- package/src/common/config/__mocks__/runtime.js +0 -6
- package/src/common/context/__mocks__/shared-context.js +0 -15
- package/src/common/context/shared-context.js +0 -25
|
@@ -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/
|
|
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/location.js","../src/common/url/parse-url.js","../src/common/url/protocol.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/obfuscate.js","../src/common/util/stringify.js","../src/common/util/submit-data.js","../src/common/util/target.js","../src/common/util/text.js","../src/common/util/traverse.js","../src/common/util/type-check.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/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-jsonp.js","../src/common/wrap/wrap-logger.js","../src/common/wrap/wrap-mutation.js","../src/common/wrap/wrap-promise.js","../src/common/wrap/wrap-timer.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/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/index.js","../src/features/metrics/aggregate/websocket-detection.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/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/spa/constants.js","../src/features/spa/index.js","../src/features/spa/aggregate/index.js","../src/features/spa/aggregate/interaction-node.js","../src/features/spa/aggregate/interaction.js","../src/features/spa/aggregate/serializer.js","../src/features/spa/instrument/index.js","../src/features/utils/agent-session.js","../src/features/utils/aggregate-base.js","../src/features/utils/entity-manager.js","../src/features/utils/event-buffer.js","../src/features/utils/event-store-manager.js","../src/features/utils/feature-base.js","../src/features/utils/feature-gates.js","../src/features/utils/instrument-base.js","../src/features/utils/lazy-feature-loader.js","../src/features/utils/nr1-debugger.js","../src/interfaces/registered-entity.js","../src/loaders/agent-base.js","../src/loaders/agent.js","../src/loaders/browser-agent.js","../src/loaders/micro-agent-base.js","../src/loaders/micro-agent.js","../src/loaders/api/api-methods.js","../src/loaders/api/api.js","../src/loaders/api/apiAsync.js","../src/loaders/api/interaction-types.js","../src/loaders/api/register-api-types.js","../src/loaders/api/register-api.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.7.3"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export function isValid(
|
|
2
|
-
export function
|
|
3
|
-
export function setInfo(id: any, obj: any): void;
|
|
1
|
+
export function isValid(info: any): boolean;
|
|
2
|
+
export function mergeInfo(info: any): any;
|
|
4
3
|
export type Info = {
|
|
5
4
|
beacon?: string | undefined;
|
|
6
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/common/config/info.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/common/config/info.js"],"names":[],"mappings":"AAkDA,4CAMC;AAEM,0CAEN;;;;;;;;;;gBAjDa,MAAM;;;;mBACN,MAAM"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export function setConfiguration(id: any, obj: any): void;
|
|
3
|
-
export function getConfigurationValue(id: any, path: any): any;
|
|
1
|
+
export function mergeInit(init: any): any;
|
|
4
2
|
export type Init = import("./init-types").Init;
|
|
5
3
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -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":"AAgJO,0CAEN;mBAvIY,OAAO,cAAc,EAAE,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-config.d.ts","sourceRoot":"","sources":["../../../../src/common/config/loader-config.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader-config.d.ts","sourceRoot":"","sources":["../../../../src/common/config/loader-config.js"],"names":[],"mappings":"AAeO,0DAEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/config/runtime.js"],"names":[],"mappings":"AAyCO,gDAON"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-ee.d.ts","sourceRoot":"","sources":["../../../../src/common/event-emitter/contextual-ee.js"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"contextual-ee.d.ts","sourceRoot":"","sources":["../../../../src/common/event-emitter/contextual-ee.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAWA,+BAA0C;AA6ExC,+FAsBC;AAqBD,6CAEC;AAND,2CAEC;AAMD,mEAaC;AA5FD,+BAKC;AAyFD,iDAGC;AA3HD,qCAA2B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function nullable(val: any, fn: any, comma: any): string;
|
|
2
2
|
export function numeric(n: any, noDefault: any): string;
|
|
3
|
-
export function getAddStringContext(
|
|
3
|
+
export function getAddStringContext(obfuscator: any): (str: any) => string;
|
|
4
4
|
export function addCustomAttributes(attrs: any, addString: any): any[];
|
|
5
5
|
//# sourceMappingURL=bel-serializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bel-serializer.d.ts","sourceRoot":"","sources":["../../../../src/common/serialize/bel-serializer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bel-serializer.d.ts","sourceRoot":"","sources":["../../../../src/common/serialize/bel-serializer.js"],"names":[],"mappings":"AAUA,gEAIC;AAED,wDAKC;AAED,2EAgBC;AAED,uEAwCC"}
|
|
@@ -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":"AAMA;;;;GAIG;AACH;IA2BE,6BAGC;IAED,qBAEC;IAED,kCAEC;IAED,4BAEC;IAED;;;;;;OAMG;IACH,8BALsB,cAAc,aACf,MAAM,WACR,MAAM,gBACD,MAAM,QAqB7B;IAED;;;;;OAKG;IACH,uCAHwB,MAAM,GACjB,MAAM,CAIlB;IAED;;;;;OAKG;IACH,0CAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAHqB,MAAM,GACf,MAAM,CAIjB;IAED;;;;OAIG;IACH,uCAHW,mBAAmB,GACjB,MAAM,CAIlB;IAED,+FAA+F;IAC/F,0BASC;;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class DT {
|
|
2
|
-
constructor(
|
|
3
|
-
|
|
2
|
+
constructor(agentRef: any);
|
|
3
|
+
agentRef: any;
|
|
4
4
|
generateTracePayload(parsedOrigin: any): {
|
|
5
5
|
spanId: string;
|
|
6
6
|
traceId: string;
|
|
@@ -9,9 +9,8 @@ export class DT {
|
|
|
9
9
|
generateTraceContextParentHeader(spanId: any, traceId: any): string;
|
|
10
10
|
generateTraceContextStateHeader(spanId: any, timestamp: any, accountId: any, appId: any, trustKey: any): string;
|
|
11
11
|
generateTraceHeader(spanId: any, traceId: any, timestamp: any, accountId: any, appId: any, trustKey: any): string | null;
|
|
12
|
-
shouldGenerateTrace(parsedOrigin: any):
|
|
12
|
+
shouldGenerateTrace(parsedOrigin: any): any;
|
|
13
13
|
isAllowedOrigin(parsedOrigin: any): boolean;
|
|
14
|
-
isDtEnabled(): boolean;
|
|
15
14
|
excludeNewrelicHeader(): boolean;
|
|
16
15
|
useNewrelicHeaderForCors(): boolean;
|
|
17
16
|
useTraceContextHeadersForCors(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-tracing.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/distributed-tracing.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"distributed-tracing.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/distributed-tracing.js"],"names":[],"mappings":"AASA;IACE,2BAEC;IADC,cAAwB;IAG1B;;;;aAsCC;IAED,oEAEC;IAED,gHASC;IAED,yHAsBC;IAID,4CAEC;IAED,4CAkBC;IAGD,iCAMC;IAED,oCAMC;IAED,yCAMC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA6BA;IACE,2BAAiC;IACjC,2CAkCC;IA/BC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/ajax/instrument/index.js"],"names":[],"mappings":"AA6BA;IACE,2BAAiC;IACjC,2CAkCC;IA/BC,OAA0B;IAE1B,8DAAkF;CA8BrF;AAkWD,qCAA8B;+BArZC,6BAA6B;mBAFzC,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IACjC,2BAmCC;IAjCC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/logging/aggregate/index.js"],"names":[],"mappings":"AAkBA;IACE,2BAAiC;IACjC,2BAmCC;IAjCC,8BAAmG;IAU5F,iBAAmC;IAyB5C,0CAKC;IAED,4HAwDC;IAED;;YAKM,0FAA0F;;;QAoB5F,0DAA0D;;QAM7D;IAED;;MAGC;IAED,yDAAyD;IACzD,yBASC;IAED,yCAIC;CACF;8BA1K6B,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAyBA;IACE,2BAAiC;IAIjC,sCAsFC;IAzFD,aAAe;IAKb,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IAEnB,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,cAA8B;IAC9B,kBAA+C;IAG/C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/aggregate/index.js"],"names":[],"mappings":"AAyBA;IACE,2BAAiC;IAIjC,sCAsFC;IAzFD,aAAe;IAKb,iFAAiF;IACjF,qBAAwB;IAGxB,2CAA2C;IAC3C,sDAAwB;IACxB,6CAA6C;IAC7C,gDAAmB;IAEnB,0BAA0B;IAC1B,kBAAqB;IACrB,6CAA6C;IAC7C,gBAA2B;IAE3B,cAA8B;IAC9B,kBAA+C;IAG/C,kCAAqG;IAoEvG,0BAEC;IAED,0BAMC;IAED,qBAUC;IAED;;;;;OAKG;IACH,4BAJW,OAAO,iBACP,OAAO,GACL,IAAI,CAuDhB;IAED,2BASC;IAED;;;oBAmDC;IAED,sCAIC;IAED;;;;;;;;;;MAuEC;IAED,sCAKC;IAED;;;;OAIG;IACH,mCAKC;IAED,yDAAyD;IACzD,+CASC;IAED,yCAIC;CACF;8BApX6B,4BAA4B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function hasReplayPrerequisite(
|
|
2
|
-
export function isPreloadAllowed(
|
|
1
|
+
export function hasReplayPrerequisite(agentInit: any): boolean;
|
|
2
|
+
export function isPreloadAllowed(agentInit: any): boolean;
|
|
3
3
|
export function buildNRMetaNode(timestamp: any, timeKeeper: any): {
|
|
4
4
|
originalTimestamp: any;
|
|
5
5
|
correctedTimestamp: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/utils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/utils.js"],"names":[],"mappings":"AAQA,+DAIC;AAED,0DAEC;AAED;;;;;;;EAUC;AAED,2DAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajax-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/ajax-node.js"],"names":[],"mappings":"AAQA;IACE,
|
|
1
|
+
{"version":3,"file":"ajax-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/ajax-node.js"],"names":[],"mappings":"AAQA;IACE,2CAiBC;IAfC,gBAA6B;IAC7B,YAA8B;IAC9B,YAA8B;IAC9B,YAA8B;IAC9B,UAA0B;IAC1B,YAAmC;IACnC,YAAoC;IACpC,+BAAwD;IACxD,YAA8B;IAC9B,aAAgC;IAChC,mBAA4C;IAC5C,SAAwB;IAM1B,6CA+BC;CACF;wBAtDuB,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class BelNode {
|
|
2
|
-
constructor(
|
|
2
|
+
constructor(agentRef: any);
|
|
3
3
|
belType: any;
|
|
4
4
|
/** List of other BelNode derivatives. Each children should be of a subclass that implements its own 'serialize' function. */
|
|
5
5
|
children: any[];
|
|
@@ -8,7 +8,8 @@ export class BelNode {
|
|
|
8
8
|
callbackEnd: number;
|
|
9
9
|
callbackDuration: number;
|
|
10
10
|
nodeId: number;
|
|
11
|
-
|
|
11
|
+
obfuscator: any;
|
|
12
|
+
info: any;
|
|
12
13
|
addChild(child: any): void;
|
|
13
14
|
/** Virtual fn for stringifying an instance. */
|
|
14
15
|
serialize(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bel-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/bel-node.js"],"names":[],"mappings":"AAMA;IAUE,
|
|
1
|
+
{"version":3,"file":"bel-node.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/bel-node.js"],"names":[],"mappings":"AAMA;IAUE,2BAGC;IAZD,aAAO;IACP,6HAA6H;IAC7H,gBAAa;IACb,WAAK;IACL,SAAG;IACH,oBAAe;IACf,yBAAoB;IACpB,eAAoB;IAGlB,gBAA6C;IAC7C,UAAyB;IAG3B,2BAEC;IAED,+CAA+C;IAC/C,kBAAe;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/index.js"],"names":[],"mappings":"AAeA;IACE,2BAAiC;IACjC;;OAoDC;IAjDC,2BAAwC;IACxC,iBAA8B;IAE9B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/index.js"],"names":[],"mappings":"AAeA;IACE,2BAAiC;IACjC;;OAoDC;IAjDC,2BAAwC;IACxC,iBAA8B;IAE9B,uDAA0E;IAe1E,yBAA+B;IAC/B,0CAAiC;IACjC,sBAA4B;IA+B9B,qCAUC;IAED,0EAiBC;IAED,2BAiBC;IAED;;;;;;;OAOG;IACH,6BAHW,mBAAmB,OAqB7B;;CA6FF;8BAvO6B,4BAA4B;2CAGf,iCAAiC;4BAChD,eAAe"}
|
package/dist/types/features/soft_navigations/aggregate/initial-page-load-interaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initial-page-load-interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/initial-page-load-interaction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initial-page-load-interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/initial-page-load-interaction.js"],"names":[],"mappings":"AAWA;IACE,2BAIC;IAED,sBAAqD;IACrD,gCAAyE;IAEzE;;;OAGG;IACH,oCA6BC;CACF;4BAlD2B,eAAe"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* link https://github.com/newrelic/nr-querypack/blob/main/schemas/bel/7.qpschema
|
|
3
3
|
**/
|
|
4
4
|
export class Interaction extends BelNode {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(agentRef: any, uiEvent: any, uiEventTimestamp: any, currentRouteKnown: any, currentUrl: any);
|
|
6
6
|
id: string;
|
|
7
7
|
initialPageURL: string;
|
|
8
8
|
customName: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/interaction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/aggregate/interaction.js"],"names":[],"mappings":"AAYA;;IAEI;AACJ;IAkBE,yGAaC;IA9BD,WAAmB;IACnB,uBAAgC;IAChC,gBAAU;IACV,qBAAqB;IACrB,oBAAoB;IACpB,eAAS;IACT,aAAO;IACP,cAAQ;IACR,+EAA+E;IAC/E,eAA8B;IAC9B,qBAAgB;IAChB,yBAAoB;IACpB,sBAAoB;IACpB,6BAA2B;IAC3B,cAAW;IACX,uBAAiB;IAIf,gBAAoC;IACpC,aAAsB;IAEtB,cAAiC;IACjC,wCAGE;IACF,mBAAyC;IAAxB,qBAAwB;IAEzC,YAAsE;IAAxD,YAAwD;IAGxE,gCAEC;IAED,iDAGC;IAED,mCAEC;IAED,8BAIC;IAED,kCAaC;IAsBD;;;;;OAKG;IACH,0BAHW,mBAAmB,WAM7B;IAGD,uBAAoB;IACpB,iCAA8B;IAC9B,sBAAmB;IAEnB,gDA4CC;;CACF;wBAzJuB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"AA6BA;IACE,2BAAiC;IACjC,2BAyrBC;IAtrBe;;;;;;;;;;;;;;MAeb;IACD,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/index.js"],"names":[],"mappings":"AA6BA;IACE,2BAAiC;IACjC,2BAyrBC;IAtrBe;;;;;;;;;;;;;;MAeb;IACD,+BAAkD;IAwqBpD,qCAEC;CACF;8BA7sB6B,4BAA4B;2BAJ/B,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/interaction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/interaction.js"],"names":[],"mappings":"AAaA,4HAwBC;;IAxBD,sGAwBC;IAvBC,cAAwB;IAGxB,WAA4C;IAC5C,eAA0B;IAC1B,cAAc;IACd,kBAAkB;IAClB,iBAAuB;IACvB,wBAA2B;IAC3B,YAAyC;IAA3B,gBAA2B;IACzC,gBAAkB;IAClB,gBAA4B;IAC5B,cAAiB;IAEN,sBAAqE;;gCAtBlD,oBAAoB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export class Serializer
|
|
1
|
+
export class Serializer {
|
|
2
|
+
constructor(agentRef: any);
|
|
3
|
+
obfuscator: any;
|
|
4
|
+
info: any;
|
|
2
5
|
/**
|
|
3
6
|
* This variable is used to calculate an interactions ending offset when the
|
|
4
7
|
* harvest includes multiple interactions. This variable is set by the first
|
|
@@ -11,5 +14,4 @@ export class Serializer extends SharedContext {
|
|
|
11
14
|
serializeSingle(root: any, offset: any, navTiming: any, isRouteChange: any): string;
|
|
12
15
|
serializeInteraction(root: any, offset: any, navTiming: any, isRouteChange: any, addString: any, info: any): any;
|
|
13
16
|
}
|
|
14
|
-
import { SharedContext } from '../../../common/context/shared-context';
|
|
15
17
|
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/serializer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../../../src/features/spa/aggregate/serializer.js"],"names":[],"mappings":"AAOA;IACE,2BAYC;IAXC,gBAA6C;IAC7C,UAAyB;IAEzB;;;;;;OAMG;IACH,gBAFU,MAAM,GAAC,SAAS,CAEK;IAGjC,0EAQC;IAED,oFAKC;IAED,iHA+JC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function canEnableSessionTracking(
|
|
1
|
+
export function canEnableSessionTracking(agentInit: any): boolean;
|
|
2
2
|
//# sourceMappingURL=feature-gates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-gates.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-gates.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-gates.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-gates.js"],"names":[],"mappings":"AAWO,0DAFM,OAAO,CAInB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"AAuBA,2CAiBC;AAID,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/api.js"],"names":[],"mappings":"AAuBA,2CAiBC;AAID,6DA2NC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function getEnabledFeatures(
|
|
1
|
+
export function getEnabledFeatures(agentInit: any): {};
|
|
2
2
|
//# sourceMappingURL=enabled-features.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enabled-features.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/enabled-features.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enabled-features.d.ts","sourceRoot":"","sources":["../../../../src/loaders/features/enabled-features.js"],"names":[],"mappings":"AAQA,uDAMC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { defaults as nrDefaults
|
|
5
|
+
import { defaults as nrDefaults } from '../window/nreum'
|
|
6
6
|
import { getModeledObject } from './configurable'
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -26,7 +26,7 @@ import { getModeledObject } from './configurable'
|
|
|
26
26
|
* @property {string} [tNamePlain]
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const InfoModel = {
|
|
30
30
|
// preset defaults
|
|
31
31
|
beacon: nrDefaults.beacon,
|
|
32
32
|
errorBeacon: nrDefaults.errorBeacon,
|
|
@@ -48,26 +48,14 @@ const model = {
|
|
|
48
48
|
tNamePlain: undefined
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export function isValid (id) {
|
|
51
|
+
export function isValid (info) {
|
|
54
52
|
try {
|
|
55
|
-
|
|
56
|
-
return (!!info.licenseKey && !!info.errorBeacon && !!info.applicationID)
|
|
53
|
+
return !!info.licenseKey && !!info.errorBeacon && !!info.applicationID
|
|
57
54
|
} catch (err) {
|
|
58
55
|
return false
|
|
59
56
|
}
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
if (!_cache[id]) throw new Error(`Info for ${id} was never set`)
|
|
65
|
-
return _cache[id]
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function setInfo (id, obj) {
|
|
69
|
-
if (!id) throw new Error('All info objects require an agent identifier!')
|
|
70
|
-
_cache[id] = getModeledObject(obj, model)
|
|
71
|
-
const agentInst = getNREUMInitializedAgent(id)
|
|
72
|
-
if (agentInst) agentInst.info = _cache[id]
|
|
59
|
+
export const mergeInfo = (info) => {
|
|
60
|
+
return getModeledObject(info, InfoModel)
|
|
73
61
|
}
|
|
@@ -6,7 +6,6 @@ import { FEATURE_FLAGS } from '../../features/generic_events/constants'
|
|
|
6
6
|
import { isValidSelector } from '../dom/query-selector'
|
|
7
7
|
import { DEFAULT_EXPIRES_MS, DEFAULT_INACTIVE_MS } from '../session/constants'
|
|
8
8
|
import { warn } from '../util/console'
|
|
9
|
-
import { getNREUMInitializedAgent } from '../window/nreum'
|
|
10
9
|
import { getModeledObject } from './configurable'
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -18,7 +17,7 @@ const nrMask = '[data-nr-mask]'
|
|
|
18
17
|
/**
|
|
19
18
|
* @returns {Init} the default configuration object
|
|
20
19
|
*/
|
|
21
|
-
const
|
|
20
|
+
const InitModelFn = () => {
|
|
22
21
|
const hiddenState = {
|
|
23
22
|
feature_flags: [],
|
|
24
23
|
experimental: {
|
|
@@ -143,35 +142,6 @@ const model = () => {
|
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
export function getConfiguration (id) {
|
|
150
|
-
if (!id) throw new Error(missingAgentIdError)
|
|
151
|
-
if (!_cache[id]) throw new Error(`Configuration for ${id} was never set`)
|
|
152
|
-
return _cache[id]
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function setConfiguration (id, obj) {
|
|
156
|
-
if (!id) throw new Error(missingAgentIdError)
|
|
157
|
-
_cache[id] = getModeledObject(obj, model())
|
|
158
|
-
const agentInst = getNREUMInitializedAgent(id)
|
|
159
|
-
if (agentInst) agentInst.init = _cache[id]
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export function getConfigurationValue (id, path) {
|
|
163
|
-
if (!id) throw new Error(missingAgentIdError)
|
|
164
|
-
var val = getConfiguration(id)
|
|
165
|
-
if (val) {
|
|
166
|
-
var parts = path.split('.')
|
|
167
|
-
for (var i = 0; i < parts.length - 1; i++) {
|
|
168
|
-
val = val[parts[i]]
|
|
169
|
-
if (typeof val !== 'object') return
|
|
170
|
-
}
|
|
171
|
-
val = val[parts[parts.length - 1]]
|
|
172
|
-
}
|
|
173
|
-
return val
|
|
145
|
+
export const mergeInit = (init) => {
|
|
146
|
+
return getModeledObject(init, InitModelFn())
|
|
174
147
|
}
|
|
175
|
-
|
|
176
|
-
// TO DO: a setConfigurationValue equivalent may be nice so individual
|
|
177
|
-
// properties can be tuned instead of reseting the whole model per call to `setConfiguration(agentIdentifier, {})`
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright 2020-2025 New Relic, Inc. All rights reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { getNREUMInitializedAgent } from '../window/nreum'
|
|
6
5
|
import { getModeledObject } from './configurable'
|
|
7
6
|
|
|
8
|
-
const
|
|
7
|
+
const LoaderConfigModel = {
|
|
9
8
|
accountID: undefined,
|
|
10
9
|
trustKey: undefined,
|
|
11
10
|
agentID: undefined,
|
|
@@ -14,17 +13,6 @@ const model = {
|
|
|
14
13
|
xpid: undefined
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
export function getLoaderConfig (id) {
|
|
20
|
-
if (!id) throw new Error('All loader-config objects require an agent identifier!')
|
|
21
|
-
if (!_cache[id]) throw new Error(`LoaderConfig for ${id} was never set`)
|
|
22
|
-
return _cache[id]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function setLoaderConfig (id, obj) {
|
|
26
|
-
if (!id) throw new Error('All loader-config objects require an agent identifier!')
|
|
27
|
-
_cache[id] = getModeledObject(obj, model)
|
|
28
|
-
const agentInst = getNREUMInitializedAgent(id)
|
|
29
|
-
if (agentInst) agentInst.loader_config = _cache[id]
|
|
16
|
+
export const mergeLoaderConfig = (loaderConfig) => {
|
|
17
|
+
return getModeledObject(loaderConfig, LoaderConfigModel)
|
|
30
18
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { getModeledObject } from './configurable'
|
|
6
|
-
import { getNREUMInitializedAgent } from '../window/nreum'
|
|
7
6
|
import { originTime } from '../constants/runtime'
|
|
8
7
|
import { BUILD_ENV, DIST_METHOD, VERSION } from '../constants/env'
|
|
9
8
|
|
|
@@ -13,14 +12,14 @@ import { BUILD_ENV, DIST_METHOD, VERSION } from '../constants/env'
|
|
|
13
12
|
*/
|
|
14
13
|
let harvestCount = 0
|
|
15
14
|
|
|
16
|
-
const
|
|
15
|
+
const ReadOnly = {
|
|
17
16
|
buildEnv: BUILD_ENV,
|
|
18
17
|
distMethod: DIST_METHOD,
|
|
19
18
|
version: VERSION,
|
|
20
19
|
originTime
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
const
|
|
22
|
+
const RuntimeModel = {
|
|
24
23
|
/** Agent-specific metadata found in the RUM call response. ex. entityGuid */
|
|
25
24
|
appMetadata: {},
|
|
26
25
|
customTransaction: undefined,
|
|
@@ -36,31 +35,15 @@ const model = {
|
|
|
36
35
|
ptid: undefined,
|
|
37
36
|
releaseIds: {},
|
|
38
37
|
session: undefined,
|
|
39
|
-
timeKeeper: undefined
|
|
38
|
+
timeKeeper: undefined,
|
|
39
|
+
get harvestCount () { return ++harvestCount }
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export function setRuntime (id, obj) {
|
|
51
|
-
if (!id) throw new Error('All runtime objects require an agent identifier!')
|
|
52
|
-
_cache[id] = {
|
|
53
|
-
...getModeledObject(obj, model),
|
|
54
|
-
...readonly
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (!Object.hasOwnProperty.call(_cache[id], 'harvestCount')) {
|
|
58
|
-
// Harvest count needs to be added as a getter so the variable is updated each time it is accessed
|
|
59
|
-
Object.defineProperty(_cache[id], 'harvestCount', {
|
|
60
|
-
get: () => ++harvestCount
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const agentInst = getNREUMInitializedAgent(id)
|
|
65
|
-
if (agentInst) agentInst.runtime = _cache[id]
|
|
42
|
+
export const mergeRuntime = (runtime) => {
|
|
43
|
+
const modeledObject = getModeledObject(runtime, RuntimeModel)
|
|
44
|
+
const readonlyDescriptors = Object.keys(ReadOnly).reduce((descriptors, key) => {
|
|
45
|
+
descriptors[key] = { value: ReadOnly[key], writable: false, configurable: true, enumerable: true }
|
|
46
|
+
return descriptors
|
|
47
|
+
}, {})
|
|
48
|
+
return Object.defineProperties(modeledObject, readonlyDescriptors)
|
|
66
49
|
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
import { gosNREUM } from '../window/nreum'
|
|
7
7
|
import { getOrSet } from '../util/get-or-set'
|
|
8
|
-
import { getRuntime } from '../config/runtime'
|
|
9
8
|
import { EventContext } from './event-context'
|
|
10
9
|
import { bundleId } from '../ids/bundle-id'
|
|
11
10
|
|
|
@@ -34,7 +33,7 @@ function ee (old, debugId) {
|
|
|
34
33
|
// We only want to check the runtime configuration for `isolatedBacklog` if the event emitter belongs to a feature.
|
|
35
34
|
// For feature event emitters, the debugId will be an agentIdentifier with a length of 16. In contrast, some of our
|
|
36
35
|
// tests do not namespace the event emitter with an agentID and just use the parent (which has no ID).
|
|
37
|
-
isolatedBacklog = debugId.length !== 16 ? false :
|
|
36
|
+
isolatedBacklog = debugId.length !== 16 ? false : nr.initializedAgents?.[debugId]?.runtime.isolatedBacklog
|
|
38
37
|
} catch (err) {
|
|
39
38
|
// Do nothing for now.
|
|
40
39
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { stringify } from '../util/stringify'
|
|
7
|
-
import { getRuntime } from '../config/runtime'
|
|
8
7
|
|
|
9
8
|
var hasOwnProp = Object.prototype.hasOwnProperty
|
|
10
9
|
var MAX_ATTRIBUTES = 64
|
|
@@ -22,10 +21,9 @@ export function numeric (n, noDefault) {
|
|
|
22
21
|
return (n === undefined || n === 0) ? '' : Math.floor(n).toString(36)
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
export function getAddStringContext (
|
|
24
|
+
export function getAddStringContext (obfuscator) {
|
|
26
25
|
let stringTableIdx = 0
|
|
27
26
|
const stringTable = Object.prototype.hasOwnProperty.call(Object, 'create') ? Object.create(null) : {}
|
|
28
|
-
const obfuscator = getRuntime(agentIdentifier).obfuscator
|
|
29
27
|
|
|
30
28
|
return addString
|
|
31
29
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { originTime } from '../constants/runtime'
|
|
6
|
-
import { getRuntime } from '../config/runtime'
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Class used to adjust the timestamp of harvested data to New Relic server time. This
|
|
@@ -37,8 +36,8 @@ export class TimeKeeper {
|
|
|
37
36
|
*/
|
|
38
37
|
#ready = false
|
|
39
38
|
|
|
40
|
-
constructor (
|
|
41
|
-
this.#session =
|
|
39
|
+
constructor (sessionObj) {
|
|
40
|
+
this.#session = sessionObj
|
|
42
41
|
this.processStoredDiff()
|
|
43
42
|
}
|
|
44
43
|
|