@newrelic/browser-agent 1.264.0 → 1.265.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 +31 -0
- package/dist/cjs/common/aggregate/aggregator.js +1 -2
- package/dist/cjs/common/config/{state/configurable.js → configurable.js} +1 -1
- package/dist/cjs/common/config/{state/info.js → info.js} +1 -1
- package/dist/cjs/common/config/{state/init.js → init.js} +5 -5
- package/dist/cjs/common/config/{state/loader-config.js → loader-config.js} +1 -1
- package/dist/cjs/common/config/{state/runtime.js → runtime.js} +16 -5
- package/dist/cjs/common/constants/agent-constants.js +8 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/context/shared-context.js +1 -2
- package/dist/cjs/common/dispatch/global-event.js +1 -2
- package/dist/cjs/common/drain/drain.js +10 -16
- package/dist/cjs/common/event-emitter/contextual-ee.js +3 -4
- package/dist/cjs/common/event-listener/event-listener-opts.js +2 -6
- package/dist/cjs/common/harvest/harvest-scheduler.js +1 -2
- package/dist/cjs/common/harvest/harvest.js +29 -56
- package/dist/cjs/common/serialize/bel-serializer.js +6 -11
- package/dist/cjs/common/session/session-entity.js +9 -12
- package/dist/cjs/common/timing/nav-timing.js +1 -3
- package/dist/cjs/common/timing/time-keeper.js +16 -6
- package/dist/cjs/common/url/encode.js +2 -4
- package/dist/cjs/common/util/console.js +2 -0
- package/dist/cjs/common/util/invoke.js +6 -16
- package/dist/cjs/common/util/obfuscate.js +97 -53
- package/dist/cjs/common/util/submit-data.js +17 -20
- package/dist/cjs/common/util/text.js +9 -0
- package/dist/cjs/common/util/traverse.js +1 -3
- package/dist/cjs/common/vitals/cumulative-layout-shift.js +5 -6
- package/dist/cjs/common/vitals/first-contentful-paint.js +4 -5
- package/dist/cjs/common/vitals/first-input-delay.js +4 -5
- package/dist/cjs/common/vitals/interaction-to-next-paint.js +5 -6
- package/dist/cjs/common/vitals/largest-contentful-paint.js +4 -5
- package/dist/cjs/common/vitals/time-to-first-byte.js +4 -5
- package/dist/cjs/common/vitals/vital-metric.js +6 -8
- package/dist/cjs/common/window/nreum.js +2 -1
- package/dist/cjs/common/window/page-visibility.js +1 -4
- package/dist/cjs/common/wrap/wrap-events.js +1 -4
- package/dist/cjs/common/wrap/wrap-promise.js +1 -4
- package/dist/cjs/common/wrap/wrap-websocket.js +74 -0
- package/dist/cjs/features/ajax/aggregate/chunk.js +4 -3
- package/dist/cjs/features/ajax/aggregate/gql.js +4 -5
- package/dist/cjs/features/ajax/aggregate/index.js +20 -23
- package/dist/cjs/features/ajax/constants.js +2 -3
- package/dist/cjs/features/ajax/instrument/distributed-tracing.js +9 -8
- package/dist/cjs/features/ajax/instrument/index.js +15 -13
- package/dist/cjs/features/generic_events/aggregate/index.js +49 -58
- package/dist/cjs/features/generic_events/constants.js +4 -2
- package/dist/cjs/features/generic_events/instrument/index.js +7 -7
- package/dist/cjs/features/jserrors/aggregate/index.js +24 -44
- package/dist/cjs/features/jserrors/instrument/index.js +5 -5
- package/dist/cjs/features/logging/aggregate/index.js +34 -37
- package/dist/cjs/features/logging/constants.js +2 -3
- package/dist/cjs/features/logging/instrument/index.js +6 -7
- package/dist/cjs/features/logging/shared/log.js +1 -3
- package/dist/cjs/features/logging/shared/utils.js +2 -4
- package/dist/cjs/features/metrics/aggregate/index.js +37 -18
- package/dist/cjs/features/metrics/aggregate/websocket-detection.js +34 -0
- package/dist/cjs/features/metrics/constants.js +5 -1
- package/dist/cjs/features/metrics/instrument/index.js +16 -5
- package/dist/cjs/features/page_action/instrument/index.js +8 -4
- package/dist/cjs/features/page_view_event/aggregate/index.js +20 -40
- package/dist/cjs/features/page_view_event/instrument/index.js +5 -5
- package/dist/cjs/features/page_view_timing/aggregate/index.js +24 -40
- package/dist/cjs/features/page_view_timing/instrument/index.js +5 -5
- package/dist/cjs/features/session_replay/aggregate/index.js +37 -44
- package/dist/cjs/features/session_replay/constants.js +1 -5
- package/dist/cjs/features/session_replay/instrument/index.js +6 -10
- package/dist/cjs/features/session_replay/shared/recorder-events.js +25 -20
- package/dist/cjs/features/session_replay/shared/recorder.js +17 -13
- package/dist/cjs/features/session_replay/shared/stylesheet-evaluator.js +3 -3
- package/dist/cjs/features/session_replay/shared/utils.js +5 -4
- package/dist/cjs/features/session_trace/aggregate/index.js +26 -43
- package/dist/cjs/features/session_trace/aggregate/trace/storage.js +7 -5
- package/dist/cjs/features/session_trace/instrument/index.js +9 -8
- package/dist/cjs/features/soft_navigations/aggregate/ajax-node.js +1 -1
- package/dist/cjs/features/soft_navigations/aggregate/bel-node.js +1 -1
- package/dist/cjs/features/soft_navigations/aggregate/index.js +23 -31
- package/dist/cjs/features/soft_navigations/aggregate/initial-page-load-interaction.js +2 -2
- package/dist/cjs/features/soft_navigations/aggregate/interaction.js +9 -10
- package/dist/cjs/features/soft_navigations/instrument/index.js +15 -14
- package/dist/cjs/features/spa/aggregate/index.js +17 -27
- package/dist/cjs/features/spa/aggregate/interaction.js +7 -6
- package/dist/cjs/features/spa/aggregate/serializer.js +3 -3
- package/dist/cjs/features/spa/constants.js +2 -2
- package/dist/cjs/features/spa/instrument/index.js +21 -20
- package/dist/cjs/features/utils/agent-session.js +6 -4
- package/dist/cjs/features/utils/aggregate-base.js +15 -10
- package/dist/cjs/features/utils/event-buffer.js +132 -0
- package/dist/cjs/features/utils/feature-gates.js +2 -2
- package/dist/cjs/features/utils/instrument-base.js +7 -8
- package/dist/cjs/features/utils/lazy-feature-loader.js +11 -11
- package/dist/cjs/features/utils/nr1-debugger.js +1 -3
- package/dist/cjs/loaders/agent-base.js +4 -8
- package/dist/cjs/loaders/agent.js +7 -2
- package/dist/cjs/loaders/api/api.js +22 -34
- package/dist/cjs/loaders/api/apiAsync.js +9 -12
- package/dist/cjs/loaders/configure/configure.js +12 -12
- package/dist/cjs/loaders/features/enabled-features.js +2 -2
- package/dist/cjs/loaders/micro-agent.js +15 -14
- package/dist/esm/common/aggregate/aggregator.js +1 -2
- package/dist/esm/common/config/{state/configurable.js → configurable.js} +1 -1
- package/dist/esm/common/config/{state/info.js → info.js} +1 -1
- package/dist/esm/common/config/{state/init.js → init.js} +5 -5
- package/dist/esm/common/config/{state/loader-config.js → loader-config.js} +1 -1
- package/dist/esm/common/config/{state/runtime.js → runtime.js} +17 -5
- package/dist/esm/common/constants/agent-constants.js +2 -0
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/context/shared-context.js +1 -2
- package/dist/esm/common/dispatch/global-event.js +1 -2
- package/dist/esm/common/drain/drain.js +10 -16
- package/dist/esm/common/event-emitter/contextual-ee.js +2 -3
- package/dist/esm/common/event-listener/event-listener-opts.js +2 -6
- package/dist/esm/common/harvest/harvest-scheduler.js +1 -2
- package/dist/esm/common/harvest/harvest.js +21 -48
- package/dist/esm/common/serialize/bel-serializer.js +6 -11
- package/dist/esm/common/session/session-entity.js +8 -11
- package/dist/esm/common/timing/nav-timing.js +1 -3
- package/dist/esm/common/timing/time-keeper.js +15 -5
- package/dist/esm/common/url/encode.js +2 -4
- package/dist/esm/common/util/console.js +2 -0
- package/dist/esm/common/util/invoke.js +6 -16
- package/dist/esm/common/util/obfuscate.js +96 -49
- package/dist/esm/common/util/submit-data.js +17 -20
- package/dist/esm/common/util/text.js +3 -0
- package/dist/esm/common/util/traverse.js +1 -3
- package/dist/esm/common/vitals/cumulative-layout-shift.js +5 -6
- package/dist/esm/common/vitals/first-contentful-paint.js +4 -5
- package/dist/esm/common/vitals/first-input-delay.js +4 -5
- package/dist/esm/common/vitals/interaction-to-next-paint.js +5 -6
- package/dist/esm/common/vitals/largest-contentful-paint.js +4 -5
- package/dist/esm/common/vitals/time-to-first-byte.js +4 -5
- package/dist/esm/common/vitals/vital-metric.js +6 -8
- package/dist/esm/common/window/nreum.js +2 -1
- package/dist/esm/common/window/page-visibility.js +1 -4
- package/dist/esm/common/wrap/wrap-events.js +1 -4
- package/dist/esm/common/wrap/wrap-promise.js +1 -4
- package/dist/esm/common/wrap/wrap-websocket.js +67 -0
- package/dist/esm/features/ajax/aggregate/chunk.js +3 -2
- package/dist/esm/features/ajax/aggregate/gql.js +4 -5
- package/dist/esm/features/ajax/aggregate/index.js +17 -20
- package/dist/esm/features/ajax/constants.js +1 -2
- package/dist/esm/features/ajax/instrument/distributed-tracing.js +2 -1
- package/dist/esm/features/ajax/instrument/index.js +11 -9
- package/dist/esm/features/generic_events/aggregate/index.js +41 -50
- package/dist/esm/features/generic_events/constants.js +3 -1
- package/dist/esm/features/generic_events/instrument/index.js +5 -5
- package/dist/esm/features/jserrors/aggregate/index.js +19 -39
- package/dist/esm/features/jserrors/instrument/index.js +4 -4
- package/dist/esm/features/logging/aggregate/index.js +32 -35
- package/dist/esm/features/logging/constants.js +1 -2
- package/dist/esm/features/logging/instrument/index.js +5 -6
- package/dist/esm/features/logging/shared/log.js +1 -3
- package/dist/esm/features/logging/shared/utils.js +2 -4
- package/dist/esm/features/metrics/aggregate/index.js +31 -12
- package/dist/esm/features/metrics/aggregate/websocket-detection.js +29 -0
- package/dist/esm/features/metrics/constants.js +4 -1
- package/dist/esm/features/metrics/instrument/index.js +15 -5
- package/dist/esm/features/page_action/instrument/index.js +7 -3
- package/dist/esm/features/page_view_event/aggregate/index.js +18 -38
- package/dist/esm/features/page_view_event/instrument/index.js +4 -4
- package/dist/esm/features/page_view_timing/aggregate/index.js +21 -37
- package/dist/esm/features/page_view_timing/instrument/index.js +4 -4
- package/dist/esm/features/session_replay/aggregate/index.js +27 -34
- package/dist/esm/features/session_replay/constants.js +0 -4
- package/dist/esm/features/session_replay/index.js +1 -7
- package/dist/esm/features/session_replay/instrument/index.js +6 -9
- package/dist/esm/features/session_replay/shared/recorder-events.js +25 -20
- package/dist/esm/features/session_replay/shared/recorder.js +14 -10
- package/dist/esm/features/session_replay/shared/stylesheet-evaluator.js +3 -3
- package/dist/esm/features/session_replay/shared/utils.js +3 -2
- package/dist/esm/features/session_trace/aggregate/index.js +21 -38
- package/dist/esm/features/session_trace/aggregate/trace/storage.js +7 -5
- package/dist/esm/features/session_trace/instrument/index.js +6 -5
- package/dist/esm/features/soft_navigations/aggregate/ajax-node.js +1 -1
- package/dist/esm/features/soft_navigations/aggregate/bel-node.js +1 -1
- package/dist/esm/features/soft_navigations/aggregate/index.js +22 -30
- package/dist/esm/features/soft_navigations/aggregate/initial-page-load-interaction.js +1 -1
- package/dist/esm/features/soft_navigations/aggregate/interaction.js +7 -8
- package/dist/esm/features/soft_navigations/instrument/index.js +12 -11
- package/dist/esm/features/spa/aggregate/index.js +11 -21
- package/dist/esm/features/spa/aggregate/interaction.js +6 -5
- package/dist/esm/features/spa/aggregate/serializer.js +1 -1
- package/dist/esm/features/spa/constants.js +2 -2
- package/dist/esm/features/spa/instrument/index.js +13 -12
- package/dist/esm/features/utils/agent-session.js +3 -1
- package/dist/esm/features/utils/aggregate-base.js +13 -8
- package/dist/esm/features/utils/event-buffer.js +126 -0
- package/dist/esm/features/utils/feature-gates.js +1 -1
- package/dist/esm/features/utils/instrument-base.js +6 -7
- package/dist/esm/features/utils/lazy-feature-loader.js +11 -11
- package/dist/esm/features/utils/nr1-debugger.js +1 -3
- package/dist/esm/loaders/agent-base.js +4 -8
- package/dist/esm/loaders/agent.js +7 -2
- package/dist/esm/loaders/api/api.js +17 -29
- package/dist/esm/loaders/api/apiAsync.js +2 -5
- package/dist/esm/loaders/configure/configure.js +5 -5
- package/dist/esm/loaders/features/enabled-features.js +1 -1
- package/dist/esm/loaders/micro-agent.js +10 -9
- package/dist/types/common/config/configurable.d.ts.map +1 -0
- package/dist/types/common/config/info.d.ts.map +1 -0
- package/dist/types/common/config/init.d.ts.map +1 -0
- package/dist/types/common/config/loader-config.d.ts.map +1 -0
- package/dist/types/common/config/runtime.d.ts.map +1 -0
- package/dist/types/common/constants/agent-constants.d.ts +3 -0
- package/dist/types/common/constants/agent-constants.d.ts.map +1 -0
- package/dist/types/common/drain/drain.d.ts.map +1 -1
- package/dist/types/common/harvest/harvest.d.ts +1 -7
- package/dist/types/common/harvest/harvest.d.ts.map +1 -1
- package/dist/types/common/serialize/bel-serializer.d.ts.map +1 -1
- package/dist/types/common/timing/time-keeper.d.ts +9 -2
- package/dist/types/common/timing/time-keeper.d.ts.map +1 -1
- package/dist/types/common/util/console.d.ts.map +1 -1
- package/dist/types/common/util/obfuscate.d.ts +78 -6
- package/dist/types/common/util/obfuscate.d.ts.map +1 -1
- package/dist/types/common/util/text.d.ts +2 -0
- package/dist/types/common/util/text.d.ts.map +1 -0
- package/dist/types/common/window/nreum.d.ts.map +1 -1
- package/dist/types/common/wrap/wrap-websocket.d.ts +4 -0
- package/dist/types/common/wrap/wrap-websocket.d.ts.map +1 -0
- package/dist/types/features/ajax/aggregate/chunk.d.ts.map +1 -1
- package/dist/types/features/ajax/aggregate/index.d.ts +2 -3
- package/dist/types/features/ajax/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/ajax/constants.d.ts +0 -1
- package/dist/types/features/ajax/constants.d.ts.map +1 -1
- package/dist/types/features/ajax/instrument/distributed-tracing.d.ts.map +1 -1
- package/dist/types/features/ajax/instrument/index.d.ts +1 -0
- package/dist/types/features/ajax/instrument/index.d.ts.map +1 -1
- package/dist/types/features/generic_events/aggregate/index.d.ts +6 -8
- package/dist/types/features/generic_events/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/generic_events/constants.d.ts +2 -0
- package/dist/types/features/generic_events/constants.d.ts.map +1 -1
- package/dist/types/features/generic_events/instrument/index.d.ts +1 -0
- package/dist/types/features/generic_events/instrument/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/aggregate/index.d.ts +2 -2
- package/dist/types/features/jserrors/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/jserrors/instrument/index.d.ts +1 -0
- package/dist/types/features/jserrors/instrument/index.d.ts.map +1 -1
- package/dist/types/features/logging/aggregate/index.d.ts +4 -7
- package/dist/types/features/logging/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/logging/constants.d.ts +0 -1
- package/dist/types/features/logging/constants.d.ts.map +1 -1
- package/dist/types/features/logging/instrument/index.d.ts +1 -0
- package/dist/types/features/logging/instrument/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/metrics/aggregate/websocket-detection.d.ts +12 -0
- package/dist/types/features/metrics/aggregate/websocket-detection.d.ts.map +1 -0
- package/dist/types/features/metrics/constants.d.ts.map +1 -1
- package/dist/types/features/metrics/instrument/index.d.ts +1 -0
- package/dist/types/features/metrics/instrument/index.d.ts.map +1 -1
- package/dist/types/features/page_action/instrument/index.d.ts +4 -0
- package/dist/types/features/page_action/instrument/index.d.ts.map +1 -1
- package/dist/types/features/page_view_event/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/page_view_event/instrument/index.d.ts +1 -0
- package/dist/types/features/page_view_event/instrument/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/page_view_timing/instrument/index.d.ts +1 -0
- package/dist/types/features/page_view_timing/instrument/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/constants.d.ts +0 -4
- package/dist/types/features/session_replay/constants.d.ts.map +1 -1
- package/dist/types/features/session_replay/instrument/index.d.ts +1 -0
- package/dist/types/features/session_replay/instrument/index.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/recorder-events.d.ts +6 -6
- package/dist/types/features/session_replay/shared/recorder-events.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/recorder.d.ts +2 -2
- package/dist/types/features/session_replay/shared/recorder.d.ts.map +1 -1
- package/dist/types/features/session_replay/shared/utils.d.ts.map +1 -1
- package/dist/types/features/session_trace/aggregate/index.d.ts +2 -2
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/aggregate/trace/storage.d.ts +1 -1
- package/dist/types/features/session_trace/aggregate/trace/storage.d.ts.map +1 -1
- package/dist/types/features/session_trace/instrument/index.d.ts +1 -0
- package/dist/types/features/session_trace/instrument/index.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/aggregate/index.d.ts +3 -3
- package/dist/types/features/soft_navigations/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/soft_navigations/instrument/index.d.ts +1 -0
- package/dist/types/features/soft_navigations/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/spa/aggregate/interaction.d.ts.map +1 -1
- package/dist/types/features/spa/constants.d.ts.map +1 -1
- package/dist/types/features/spa/instrument/index.d.ts +1 -0
- package/dist/types/features/spa/instrument/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 +1 -0
- package/dist/types/features/utils/aggregate-base.d.ts.map +1 -1
- package/dist/types/features/utils/event-buffer.d.ts +72 -0
- package/dist/types/features/utils/event-buffer.d.ts.map +1 -0
- package/dist/types/features/utils/instrument-base.d.ts +1 -0
- package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
- package/dist/types/loaders/agent-base.d.ts +1 -1
- package/dist/types/loaders/agent.d.ts.map +1 -1
- package/dist/types/loaders/api/api.d.ts.map +1 -1
- package/dist/types/loaders/configure/configure.d.ts.map +1 -1
- package/dist/types/loaders/micro-agent.d.ts.map +1 -1
- package/package.json +55 -59
- package/src/common/config/__mocks__/info.js +3 -0
- package/src/common/config/__mocks__/init.js +3 -0
- package/src/common/config/__mocks__/loader-config.js +2 -0
- package/src/common/config/__mocks__/runtime.js +2 -0
- package/src/common/config/{state/configurable.js → configurable.js} +1 -1
- package/src/common/config/{state/info.js → info.js} +1 -1
- package/src/common/config/{state/init.js → init.js} +5 -5
- package/src/common/config/{state/loader-config.js → loader-config.js} +1 -1
- package/src/common/config/{state/runtime.js → runtime.js} +19 -5
- package/src/common/constants/agent-constants.js +2 -0
- package/src/common/drain/drain.js +5 -2
- package/src/common/event-emitter/contextual-ee.js +1 -1
- package/src/common/harvest/harvest.js +7 -21
- package/src/common/serialize/bel-serializer.js +5 -7
- package/src/common/session/session-entity.js +2 -2
- package/src/common/timing/__mocks__/time-keeper.js +6 -2
- package/src/common/timing/time-keeper.js +15 -5
- package/src/common/util/__mocks__/console.js +1 -0
- package/src/common/util/__mocks__/obfuscate.js +5 -8
- package/src/common/util/console.js +2 -0
- package/src/common/util/obfuscate.js +94 -50
- package/src/common/util/text.js +6 -0
- package/src/common/window/__mocks__/nreum.js +1 -1
- package/src/common/window/nreum.js +2 -1
- package/src/common/wrap/wrap-websocket.js +73 -0
- package/src/features/ajax/aggregate/chunk.js +3 -2
- package/src/features/ajax/aggregate/index.js +20 -19
- package/src/features/ajax/constants.js +0 -2
- package/src/features/ajax/instrument/distributed-tracing.js +2 -1
- package/src/features/ajax/instrument/index.js +9 -5
- package/src/features/generic_events/aggregate/index.js +43 -37
- package/src/features/generic_events/constants.js +2 -0
- package/src/features/generic_events/instrument/index.js +3 -1
- package/src/features/jserrors/aggregate/index.js +14 -4
- package/src/features/jserrors/instrument/index.js +2 -0
- package/src/features/logging/aggregate/index.js +39 -31
- package/src/features/logging/constants.js +0 -2
- package/src/features/logging/instrument/index.js +2 -0
- package/src/features/logging/shared/utils.js +1 -1
- package/src/features/metrics/aggregate/index.js +24 -9
- package/src/features/metrics/aggregate/websocket-detection.js +31 -0
- package/src/features/metrics/constants.js +3 -0
- package/src/features/metrics/instrument/index.js +13 -1
- package/src/features/page_action/instrument/index.js +5 -0
- package/src/features/page_view_event/aggregate/index.js +8 -23
- package/src/features/page_view_event/instrument/index.js +2 -0
- package/src/features/page_view_timing/aggregate/index.js +14 -16
- package/src/features/page_view_timing/instrument/index.js +2 -0
- package/src/features/session_replay/aggregate/index.js +13 -9
- package/src/features/session_replay/constants.js +0 -4
- package/src/features/session_replay/index.js +1 -7
- package/src/features/session_replay/instrument/index.js +3 -4
- package/src/features/session_replay/shared/recorder-events.js +27 -20
- package/src/features/session_replay/shared/recorder.js +13 -6
- package/src/features/session_replay/shared/stylesheet-evaluator.js +2 -2
- package/src/features/session_replay/shared/utils.js +3 -2
- package/src/features/session_trace/aggregate/index.js +16 -7
- package/src/features/session_trace/aggregate/trace/storage.js +6 -1
- package/src/features/session_trace/instrument/index.js +4 -1
- package/src/features/soft_navigations/aggregate/ajax-node.js +1 -1
- package/src/features/soft_navigations/aggregate/index.js +13 -15
- package/src/features/soft_navigations/aggregate/initial-page-load-interaction.js +1 -1
- package/src/features/soft_navigations/aggregate/interaction.js +1 -1
- package/src/features/soft_navigations/instrument/index.js +9 -5
- package/src/features/spa/aggregate/index.js +11 -18
- package/src/features/spa/aggregate/interaction.js +5 -3
- package/src/features/spa/aggregate/serializer.js +1 -1
- package/src/features/spa/constants.js +2 -2
- package/src/features/spa/instrument/index.js +9 -3
- package/src/features/utils/agent-session.js +3 -1
- package/src/features/utils/aggregate-base.js +10 -2
- package/src/features/utils/event-buffer.js +126 -0
- package/src/features/utils/feature-gates.js +1 -1
- package/src/features/utils/instrument-base.js +2 -1
- package/src/loaders/agent-base.js +2 -2
- package/src/loaders/agent.js +7 -2
- package/src/loaders/api/api.js +2 -1
- package/src/loaders/api/apiAsync.js +1 -1
- package/src/loaders/configure/configure.js +4 -1
- package/src/loaders/features/enabled-features.js +1 -1
- package/src/loaders/micro-agent.js +4 -1
- package/dist/cjs/common/config/config.js +0 -76
- package/dist/cjs/common/config/state/originals.js +0 -8
- package/dist/cjs/common/wrap/index.js +0 -61
- package/dist/esm/common/config/config.js +0 -11
- package/dist/esm/common/config/state/originals.js +0 -2
- package/dist/esm/common/wrap/index.js +0 -13
- package/dist/types/common/config/config.d.ts +0 -13
- package/dist/types/common/config/config.d.ts.map +0 -1
- package/dist/types/common/config/state/configurable.d.ts.map +0 -1
- package/dist/types/common/config/state/info.d.ts.map +0 -1
- package/dist/types/common/config/state/init.d.ts.map +0 -1
- package/dist/types/common/config/state/loader-config.d.ts.map +0 -1
- package/dist/types/common/config/state/originals.d.ts +0 -2
- package/dist/types/common/config/state/originals.d.ts.map +0 -1
- package/dist/types/common/config/state/runtime.d.ts.map +0 -1
- package/dist/types/common/wrap/index.d.ts +0 -10
- package/dist/types/common/wrap/index.d.ts.map +0 -1
- package/src/common/config/__mocks__/config.js +0 -11
- package/src/common/config/config.js +0 -12
- package/src/common/config/state/originals.js +0 -3
- package/src/common/wrap/index.js +0 -16
- /package/dist/types/common/config/{state/configurable.d.ts → configurable.d.ts} +0 -0
- /package/dist/types/common/config/{state/info.d.ts → info.d.ts} +0 -0
- /package/dist/types/common/config/{state/init.d.ts → init.d.ts} +0 -0
- /package/dist/types/common/config/{state/loader-config.d.ts → loader-config.d.ts} +0 -0
- /package/dist/types/common/config/{state/runtime.d.ts → runtime.d.ts} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Instrument = void 0;
|
|
6
|
+
exports.JSErrors = exports.Instrument = void 0;
|
|
7
7
|
var _handle = require("../../../common/event-emitter/handle");
|
|
8
8
|
var _instrumentBase = require("../../utils/instrument-base");
|
|
9
9
|
var _constants = require("../constants");
|
|
@@ -18,10 +18,9 @@ var _castError = require("../shared/cast-error");
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
class Instrument extends _instrumentBase.InstrumentBase {
|
|
21
|
-
static featureName =
|
|
21
|
+
static featureName = _constants.FEATURE_NAME;
|
|
22
22
|
#replayRunning = false;
|
|
23
|
-
constructor(agentIdentifier, aggregator) {
|
|
24
|
-
let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
23
|
+
constructor(agentIdentifier, aggregator, auto = true) {
|
|
25
24
|
super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
|
|
26
25
|
try {
|
|
27
26
|
// this try-catch can be removed when IE11 is completely unsupported & gone
|
|
@@ -54,4 +53,5 @@ class Instrument extends _instrumentBase.InstrumentBase {
|
|
|
54
53
|
this.abortHandler = undefined; // weakly allow this abort op to run only once
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
exports.Instrument = Instrument;
|
|
56
|
+
exports.Instrument = Instrument;
|
|
57
|
+
const JSErrors = exports.JSErrors = Instrument;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Aggregate = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _info = require("../../../common/config/info");
|
|
8
|
+
var _init = require("../../../common/config/init");
|
|
9
|
+
var _runtime = require("../../../common/config/runtime");
|
|
8
10
|
var _handle = require("../../../common/event-emitter/handle");
|
|
9
11
|
var _registerHandler = require("../../../common/event-emitter/register-handler");
|
|
10
12
|
var _harvestScheduler = require("../../../common/harvest/harvest-scheduler");
|
|
@@ -15,22 +17,21 @@ var _aggregateBase = require("../../utils/aggregate-base");
|
|
|
15
17
|
var _constants2 = require("../constants");
|
|
16
18
|
var _log = require("../shared/log");
|
|
17
19
|
var _utils = require("../shared/utils");
|
|
20
|
+
var _traverse = require("../../../common/util/traverse");
|
|
21
|
+
var _agentConstants = require("../../../common/constants/agent-constants");
|
|
22
|
+
var _eventBuffer = require("../../utils/event-buffer");
|
|
18
23
|
class Aggregate extends _aggregateBase.AggregateBase {
|
|
19
|
-
static featureName =
|
|
24
|
+
static featureName = _constants2.FEATURE_NAME;
|
|
20
25
|
#agentRuntime;
|
|
21
26
|
#agentInfo;
|
|
22
27
|
constructor(agentIdentifier, aggregator) {
|
|
23
28
|
super(agentIdentifier, aggregator, _constants2.FEATURE_NAME);
|
|
24
29
|
|
|
25
30
|
/** held logs before sending */
|
|
26
|
-
this.bufferedLogs =
|
|
27
|
-
|
|
28
|
-
this
|
|
29
|
-
|
|
30
|
-
this.estimatedBytes = 0;
|
|
31
|
-
this.#agentRuntime = (0, _config.getRuntime)(this.agentIdentifier);
|
|
32
|
-
this.#agentInfo = (0, _config.getInfo)(this.agentIdentifier);
|
|
33
|
-
this.harvestTimeSeconds = (0, _config.getConfigurationValue)(this.agentIdentifier, 'logging.harvestTimeSeconds');
|
|
31
|
+
this.bufferedLogs = new _eventBuffer.EventBuffer();
|
|
32
|
+
this.#agentRuntime = (0, _runtime.getRuntime)(this.agentIdentifier);
|
|
33
|
+
this.#agentInfo = (0, _info.getInfo)(this.agentIdentifier);
|
|
34
|
+
this.harvestTimeSeconds = (0, _init.getConfigurationValue)(this.agentIdentifier, 'logging.harvestTimeSeconds');
|
|
34
35
|
this.waitForFlags([]).then(() => {
|
|
35
36
|
this.scheduler = new _harvestScheduler.HarvestScheduler('browser/logs', {
|
|
36
37
|
onFinished: this.onHarvestFinished.bind(this),
|
|
@@ -38,16 +39,14 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
38
39
|
getPayload: this.prepareHarvest.bind(this),
|
|
39
40
|
raw: true
|
|
40
41
|
}, this);
|
|
41
|
-
/** harvest immediately once started to purge pre-load logs collected */
|
|
42
|
-
this.scheduler.startTimer(this.harvestTimeSeconds, 0);
|
|
43
42
|
/** emitted by instrument class (wrapped loggers) or the api methods directly */
|
|
44
43
|
(0, _registerHandler.registerHandler)(_constants2.LOGGING_EVENT_EMITTER_CHANNEL, this.handleLog.bind(this), this.featureName, this.ee);
|
|
45
44
|
this.drain();
|
|
45
|
+
/** harvest immediately once started to purge pre-load logs collected */
|
|
46
|
+
this.scheduler.startTimer(this.harvestTimeSeconds, 0);
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
|
-
handleLog(timestamp, message) {
|
|
49
|
-
let attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
50
|
-
let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _constants2.LOG_LEVELS.INFO;
|
|
49
|
+
handleLog(timestamp, message, attributes = {}, level = _constants2.LOG_LEVELS.INFO) {
|
|
51
50
|
if (this.blocked) return;
|
|
52
51
|
if (!attributes || typeof attributes !== 'object') attributes = {};
|
|
53
52
|
if (typeof level === 'string') level = level.toUpperCase();
|
|
@@ -67,30 +66,26 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
68
|
if (typeof message !== 'string' || !message) return (0, _console.warn)(32);
|
|
70
|
-
|
|
71
|
-
(0, _handle.handle)(_constants.SUPPORTABILITY_METRIC_CHANNEL, ['Logging/Harvest/Failed/Seen', message.length]);
|
|
72
|
-
return (0, _console.warn)(31, message.slice(0, 25) + '...');
|
|
73
|
-
}
|
|
74
|
-
const log = new _log.Log(this.#agentRuntime.timeKeeper.convertRelativeTimestamp(timestamp), message, attributes, level);
|
|
69
|
+
const log = new _log.Log(Math.floor(this.#agentRuntime.timeKeeper.correctAbsoluteTimestamp(this.#agentRuntime.timeKeeper.convertRelativeTimestamp(timestamp))), message, attributes, level);
|
|
75
70
|
const logBytes = log.message.length + (0, _stringify.stringify)(log.attributes).length + log.level.length + 10; // timestamp == 10 chars
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
|
|
72
|
+
if (!this.bufferedLogs.canMerge(logBytes)) {
|
|
73
|
+
if (this.bufferedLogs.hasData) {
|
|
74
|
+
(0, _handle.handle)(_constants.SUPPORTABILITY_METRIC_CHANNEL, ['Logging/Harvest/Early/Seen', this.bufferedLogs.bytes + logBytes]);
|
|
75
|
+
this.scheduler.runHarvest({});
|
|
76
|
+
if (logBytes < _agentConstants.MAX_PAYLOAD_SIZE) this.bufferedLogs.add(log);
|
|
77
|
+
} else {
|
|
78
|
+
(0, _handle.handle)(_constants.SUPPORTABILITY_METRIC_CHANNEL, ['Logging/Harvest/Failed/Seen', logBytes]);
|
|
79
|
+
(0, _console.warn)(31, log.message.slice(0, 25) + '...');
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
83
82
|
}
|
|
84
|
-
this.
|
|
85
|
-
this.bufferedLogs.push(log);
|
|
83
|
+
this.bufferedLogs.add(log);
|
|
86
84
|
}
|
|
87
|
-
prepareHarvest() {
|
|
88
|
-
if (this.blocked || !
|
|
89
|
-
/** populate outgoing array while also clearing main buffer */
|
|
90
|
-
this.outgoingLogs.push(...this.bufferedLogs.splice(0));
|
|
91
|
-
this.estimatedBytes = 0;
|
|
85
|
+
prepareHarvest(options = {}) {
|
|
86
|
+
if (this.blocked || !this.bufferedLogs.hasData) return;
|
|
92
87
|
/** see https://source.datanerd.us/agents/rum-specs/blob/main/browser/Log for logging spec */
|
|
93
|
-
|
|
88
|
+
const payload = {
|
|
94
89
|
qs: {
|
|
95
90
|
browser_monitoring_key: this.#agentInfo.licenseKey
|
|
96
91
|
},
|
|
@@ -116,12 +111,14 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
116
111
|
}
|
|
117
112
|
},
|
|
118
113
|
/** logs section contains individual unique log entries */
|
|
119
|
-
logs: this.
|
|
114
|
+
logs: (0, _traverse.applyFnToProps)(this.bufferedLogs.buffer, this.obfuscator.obfuscateString.bind(this.obfuscator), 'string')
|
|
120
115
|
}]
|
|
121
116
|
};
|
|
117
|
+
if (options.retry) this.bufferedLogs.hold();else this.bufferedLogs.clear();
|
|
118
|
+
return payload;
|
|
122
119
|
}
|
|
123
120
|
onHarvestFinished(result) {
|
|
124
|
-
if (
|
|
121
|
+
if (result.retry) this.bufferedLogs.unhold();else this.bufferedLogs.held.clear();
|
|
125
122
|
}
|
|
126
123
|
}
|
|
127
124
|
exports.Aggregate = Aggregate;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.LOG_LEVELS = exports.LOGGING_EVENT_EMITTER_CHANNEL = exports.FEATURE_NAME = void 0;
|
|
7
7
|
var _features = require("../../loaders/features/features");
|
|
8
8
|
const LOG_LEVELS = exports.LOG_LEVELS = {
|
|
9
9
|
ERROR: 'ERROR',
|
|
@@ -13,5 +13,4 @@ const LOG_LEVELS = exports.LOG_LEVELS = {
|
|
|
13
13
|
TRACE: 'TRACE'
|
|
14
14
|
};
|
|
15
15
|
const LOGGING_EVENT_EMITTER_CHANNEL = exports.LOGGING_EVENT_EMITTER_CHANNEL = 'log';
|
|
16
|
-
const FEATURE_NAME = exports.FEATURE_NAME = _features.FEATURE_NAMES.logging;
|
|
17
|
-
const MAX_PAYLOAD_SIZE = exports.MAX_PAYLOAD_SIZE = 1000000;
|
|
16
|
+
const FEATURE_NAME = exports.FEATURE_NAME = _features.FEATURE_NAMES.logging;
|
|
@@ -3,19 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Instrument = void 0;
|
|
6
|
+
exports.Logging = exports.Instrument = void 0;
|
|
7
7
|
var _instrumentBase = require("../../utils/instrument-base");
|
|
8
8
|
var _constants = require("../constants");
|
|
9
9
|
var _utils = require("../shared/utils");
|
|
10
10
|
class Instrument extends _instrumentBase.InstrumentBase {
|
|
11
|
-
static featureName =
|
|
12
|
-
constructor(agentIdentifier, aggregator) {
|
|
13
|
-
let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
11
|
+
static featureName = _constants.FEATURE_NAME;
|
|
12
|
+
constructor(agentIdentifier, aggregator, auto = true) {
|
|
14
13
|
super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
|
|
15
14
|
const instanceEE = this.ee;
|
|
16
15
|
/** emitted by wrap-logger function */
|
|
17
|
-
this.ee.on('wrap-logger-end', function handleLog(
|
|
18
|
-
let [message] = _ref;
|
|
16
|
+
this.ee.on('wrap-logger-end', function handleLog([message]) {
|
|
19
17
|
const {
|
|
20
18
|
level,
|
|
21
19
|
customAttributes
|
|
@@ -25,4 +23,5 @@ class Instrument extends _instrumentBase.InstrumentBase {
|
|
|
25
23
|
this.importAggregator();
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
exports.Instrument = Instrument;
|
|
26
|
+
exports.Instrument = Instrument;
|
|
27
|
+
const Logging = exports.Logging = Instrument;
|
|
@@ -23,9 +23,7 @@ class Log {
|
|
|
23
23
|
* @param {object} attributes - other log event attributes
|
|
24
24
|
* @param {enum} level - Log level
|
|
25
25
|
*/
|
|
26
|
-
constructor(timestamp, message) {
|
|
27
|
-
let attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
28
|
-
let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _constants.LOG_LEVELS.INFO;
|
|
26
|
+
constructor(timestamp, message, attributes = {}, level = _constants.LOG_LEVELS.INFO) {
|
|
29
27
|
/** @type {long} */
|
|
30
28
|
this.timestamp = timestamp;
|
|
31
29
|
this.message = message;
|
|
@@ -16,9 +16,7 @@ var _constants2 = require("../constants");
|
|
|
16
16
|
* @param {{[key: string]: *}} customAttributes - The log's custom attributes if any
|
|
17
17
|
* @param {enum} level - the log level enum
|
|
18
18
|
*/
|
|
19
|
-
function bufferLog(ee, message) {
|
|
20
|
-
let customAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
21
|
-
let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _constants2.LOG_LEVELS.INFO;
|
|
19
|
+
function bufferLog(ee, message, customAttributes = {}, level = _constants2.LOG_LEVELS.INFO) {
|
|
22
20
|
(0, _handle.handle)(_constants.SUPPORTABILITY_METRIC_CHANNEL, ["API/logging/".concat(level.toLowerCase(), "/called")], undefined, _features.FEATURE_NAMES.metrics, ee);
|
|
23
21
|
(0, _handle.handle)(_constants2.LOGGING_EVENT_EMITTER_CHANNEL, [(0, _now.now)(), message, customAttributes, level], undefined, _features.FEATURE_NAMES.logging, ee);
|
|
24
22
|
}
|
|
@@ -30,5 +28,5 @@ function bufferLog(ee, message) {
|
|
|
30
28
|
*/
|
|
31
29
|
function isValidLogLevel(level) {
|
|
32
30
|
if (typeof level !== 'string') return false;
|
|
33
|
-
return Object.values(_constants2.LOG_LEVELS).some(logLevel => logLevel === level);
|
|
31
|
+
return Object.values(_constants2.LOG_LEVELS).some(logLevel => logLevel === level.toUpperCase().trim());
|
|
34
32
|
}
|
|
@@ -4,24 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Aggregate = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _init = require("../../../common/config/init");
|
|
8
|
+
var _runtime = require("../../../common/config/runtime");
|
|
8
9
|
var _registerHandler = require("../../../common/event-emitter/register-handler");
|
|
9
10
|
var _harvestScheduler = require("../../../common/harvest/harvest-scheduler");
|
|
10
11
|
var _constants = require("../constants");
|
|
11
12
|
var _frameworkDetection = require("./framework-detection");
|
|
12
13
|
var _protocol = require("../../../common/url/protocol");
|
|
13
|
-
var _obfuscate = require("../../../common/util/obfuscate");
|
|
14
14
|
var _load = require("../../../common/window/load");
|
|
15
15
|
var _eventListenerOpts = require("../../../common/event-listener/event-listener-opts");
|
|
16
|
-
var
|
|
16
|
+
var _runtime2 = require("../../../common/constants/runtime");
|
|
17
17
|
var _aggregateBase = require("../../utils/aggregate-base");
|
|
18
18
|
var _drain = require("../../../common/drain/drain");
|
|
19
|
+
// import { WEBSOCKET_TAG } from '../../../common/wrap/wrap-websocket'
|
|
20
|
+
// import { handleWebsocketEvents } from './websocket-detection'
|
|
21
|
+
|
|
19
22
|
class Aggregate extends _aggregateBase.AggregateBase {
|
|
20
|
-
static featureName =
|
|
23
|
+
static featureName = _constants.FEATURE_NAME;
|
|
21
24
|
constructor(agentIdentifier, aggregator) {
|
|
22
25
|
super(agentIdentifier, aggregator, _constants.FEATURE_NAME);
|
|
23
|
-
this.waitForFlags(['err']).then(
|
|
24
|
-
let [errFlag] = _ref;
|
|
26
|
+
this.waitForFlags(['err']).then(([errFlag]) => {
|
|
25
27
|
if (errFlag) {
|
|
26
28
|
// *cli, Mar 23 - Per NR-94597, this feature should only harvest ONCE at the (potential) EoL time of the page.
|
|
27
29
|
const scheduler = new _harvestScheduler.HarvestScheduler('jserrors', {
|
|
@@ -65,15 +67,15 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
65
67
|
const {
|
|
66
68
|
distMethod,
|
|
67
69
|
loaderType
|
|
68
|
-
} = (0,
|
|
70
|
+
} = (0, _runtime.getRuntime)(this.agentIdentifier);
|
|
69
71
|
const {
|
|
70
72
|
proxy,
|
|
71
73
|
privacy,
|
|
72
74
|
page_view_timing
|
|
73
|
-
} = (0,
|
|
75
|
+
} = (0, _init.getConfiguration)(this.agentIdentifier);
|
|
74
76
|
if (loaderType) this.storeSupportabilityMetrics("Generic/LoaderType/".concat(loaderType, "/Detected"));
|
|
75
77
|
if (distMethod) this.storeSupportabilityMetrics("Generic/DistMethod/".concat(distMethod, "/Detected"));
|
|
76
|
-
if (
|
|
78
|
+
if (_runtime2.isBrowserScope) {
|
|
77
79
|
this.storeSupportabilityMetrics('Generic/Runtime/Browser/Detected');
|
|
78
80
|
const nonce = document?.currentScript?.nonce;
|
|
79
81
|
if (nonce && nonce !== '') {
|
|
@@ -88,7 +90,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
88
90
|
});
|
|
89
91
|
if (!privacy.cookies_enabled) this.storeSupportabilityMetrics('Config/SessionTracking/Disabled');
|
|
90
92
|
if (page_view_timing.long_task) this.storeSupportabilityMetrics('Config/LongTask/Enabled');
|
|
91
|
-
} else if (
|
|
93
|
+
} else if (_runtime2.isWorkerScope) {
|
|
92
94
|
this.storeSupportabilityMetrics('Generic/Runtime/Worker/Detected');
|
|
93
95
|
} else {
|
|
94
96
|
this.storeSupportabilityMetrics('Generic/Runtime/Unknown/Detected');
|
|
@@ -101,21 +103,32 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
// Capture SMs to assess customer engagement with the obfuscation config
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
|
|
106
|
+
const ruleValidations = this.obfuscator.ruleValidationCache;
|
|
107
|
+
if (ruleValidations.length > 0) {
|
|
108
|
+
this.storeSupportabilityMetrics('Generic/Obfuscate/Detected');
|
|
109
|
+
if (ruleValidations.filter(ruleValidation => !ruleValidation.isValid).length > 0) this.storeSupportabilityMetrics('Generic/Obfuscate/Invalid');
|
|
110
|
+
}
|
|
107
111
|
|
|
108
112
|
// Check if proxy for either chunks or beacon is being used
|
|
109
113
|
if (proxy.assets) this.storeSupportabilityMetrics('Config/AssetsUrl/Changed');
|
|
110
114
|
if (proxy.beacon) this.storeSupportabilityMetrics('Config/BeaconUrl/Changed');
|
|
111
|
-
if (
|
|
112
|
-
|
|
115
|
+
if (_runtime2.isBrowserScope && window.MutationObserver) {
|
|
116
|
+
if (window.self !== window.top) {
|
|
117
|
+
this.storeSupportabilityMetrics('Generic/Runtime/IFrame/Detected');
|
|
118
|
+
}
|
|
119
|
+
const preExistingVideos = window.document.querySelectorAll('video').length;
|
|
120
|
+
if (preExistingVideos) this.storeSupportabilityMetrics('Generic/VideoElement/Added', preExistingVideos);
|
|
121
|
+
const preExistingIframes = window.document.querySelectorAll('iframe').length;
|
|
122
|
+
if (preExistingIframes) this.storeSupportabilityMetrics('Generic/IFrame/Added', preExistingIframes);
|
|
113
123
|
const mo = new MutationObserver(records => {
|
|
114
124
|
records.forEach(record => {
|
|
115
125
|
record.addedNodes.forEach(addedNode => {
|
|
116
126
|
if (addedNode instanceof HTMLVideoElement) {
|
|
117
127
|
this.storeSupportabilityMetrics('Generic/VideoElement/Added', 1);
|
|
118
128
|
}
|
|
129
|
+
if (addedNode instanceof HTMLIFrameElement) {
|
|
130
|
+
this.storeSupportabilityMetrics('Generic/IFrame/Added', 1);
|
|
131
|
+
}
|
|
119
132
|
});
|
|
120
133
|
});
|
|
121
134
|
});
|
|
@@ -124,9 +137,15 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
124
137
|
subtree: true
|
|
125
138
|
});
|
|
126
139
|
}
|
|
140
|
+
|
|
141
|
+
// WATCHABLE_WEB_SOCKET_EVENTS.forEach(tag => {
|
|
142
|
+
// registerHandler('buffered-' + WEBSOCKET_TAG + tag, (...args) => {
|
|
143
|
+
// handleWebsocketEvents(this.storeSupportabilityMetrics.bind(this), tag, ...args)
|
|
144
|
+
// }, this.featureName, this.ee)
|
|
145
|
+
// })
|
|
127
146
|
}
|
|
128
147
|
eachSessionChecks() {
|
|
129
|
-
if (!
|
|
148
|
+
if (!_runtime2.isBrowserScope) return;
|
|
130
149
|
|
|
131
150
|
// [Temporary] Report restores from BFCache to NR1 while feature flag is in place in lieu of sending pageshow events.
|
|
132
151
|
(0, _eventListenerOpts.windowAddEventListener)('pageshow', evt => {
|
|
@@ -165,8 +184,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
165
184
|
if (typeof performance !== 'undefined') {
|
|
166
185
|
const markers = performance.getEntriesByType('mark');
|
|
167
186
|
const measures = performance.getEntriesByType('measure');
|
|
168
|
-
this.storeSupportabilityMetrics('Generic/Performance/Mark/Seen', markers.length);
|
|
169
|
-
this.storeSupportabilityMetrics('Generic/Performance/Measure/Seen', measures.length);
|
|
187
|
+
if (markers.length) this.storeSupportabilityMetrics('Generic/Performance/Mark/Seen', markers.length);
|
|
188
|
+
if (measures.length) this.storeSupportabilityMetrics('Generic/Performance/Measure/Seen', measures.length);
|
|
170
189
|
}
|
|
171
190
|
} catch (e) {
|
|
172
191
|
// do nothing
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.handleWebsocketEvents = handleWebsocketEvents;
|
|
7
|
+
var _dataSize = require("../../../common/util/data-size");
|
|
8
|
+
var _text = require("../../../common/util/text");
|
|
9
|
+
var _wrapWebsocket = require("../../../common/wrap/wrap-websocket");
|
|
10
|
+
/**
|
|
11
|
+
* A SM handler for web socket events, which converts them to a shape suitable for SMs and reports them.
|
|
12
|
+
* @param {Function} reporter a function that reports data as a supportability metric
|
|
13
|
+
* @param {string} tag the unique tag to assign to the sm
|
|
14
|
+
* @param {number} timestamp ms from page origin
|
|
15
|
+
* @param {number} timeSinceInit ms from class init
|
|
16
|
+
* @param {boolean} isLoaded whether the even was observed before the page load event
|
|
17
|
+
* @param {string} socketId a unique id assigned to the observed socket
|
|
18
|
+
* @param {*} data the data reported alongside the socket event
|
|
19
|
+
*/
|
|
20
|
+
function handleWebsocketEvents(reporter, tag, timestamp, timeSinceInit, isLoaded, socketId, data) {
|
|
21
|
+
// socketId is unused in the SMs
|
|
22
|
+
const useDataType = tag === _wrapWebsocket.ADD_EVENT_LISTENER_TAG;
|
|
23
|
+
let metricTag = (0, _text.toTitleCase)(useDataType ? data.eventType : tag);
|
|
24
|
+
if (metricTag === 'Close') {
|
|
25
|
+
if (data?.event.code === 1000 || data?.event.wasClean) metricTag += '-Clean';else metricTag += '-Dirty';
|
|
26
|
+
}
|
|
27
|
+
const bytes = metricTag === 'Message' && (0, _dataSize.dataSize)(data?.event?.data) || metricTag === 'Send' && (0, _dataSize.dataSize)(data);
|
|
28
|
+
reporter(buildSMTag(metricTag, 'Ms'), timestamp);
|
|
29
|
+
reporter(buildSMTag(metricTag, 'MsSinceClassInit'), timeSinceInit);
|
|
30
|
+
if (bytes) reporter(buildSMTag(metricTag, 'Bytes'), bytes);
|
|
31
|
+
}
|
|
32
|
+
function buildSMTag(tag, category) {
|
|
33
|
+
return 'WebSocket/' + tag + '/' + category;
|
|
34
|
+
}
|
|
@@ -5,8 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SUPPORTABILITY_METRIC_CHANNEL = exports.SUPPORTABILITY_METRIC = exports.FEATURE_NAME = exports.CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC = void 0;
|
|
7
7
|
var _features = require("../../loaders/features/features");
|
|
8
|
+
// import { ADD_EVENT_LISTENER_TAG } from '../../common/wrap/wrap-websocket'
|
|
9
|
+
|
|
8
10
|
const FEATURE_NAME = exports.FEATURE_NAME = _features.FEATURE_NAMES.metrics;
|
|
9
11
|
const SUPPORTABILITY_METRIC = exports.SUPPORTABILITY_METRIC = 'sm';
|
|
10
12
|
const CUSTOM_METRIC = exports.CUSTOM_METRIC = 'cm';
|
|
11
13
|
const SUPPORTABILITY_METRIC_CHANNEL = exports.SUPPORTABILITY_METRIC_CHANNEL = 'storeSupportabilityMetrics';
|
|
12
|
-
const CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
|
|
14
|
+
const CUSTOM_METRIC_CHANNEL = exports.CUSTOM_METRIC_CHANNEL = 'storeEventMetrics';
|
|
15
|
+
|
|
16
|
+
// export const WATCHABLE_WEB_SOCKET_EVENTS = ['new', 'send', 'close', ADD_EVENT_LISTENER_TAG]
|
|
@@ -3,15 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Instrument = void 0;
|
|
6
|
+
exports.Metrics = exports.Instrument = void 0;
|
|
7
7
|
var _instrumentBase = require("../../utils/instrument-base");
|
|
8
8
|
var _constants = require("../constants");
|
|
9
|
+
// import { handle } from '../../../common/event-emitter/handle'
|
|
10
|
+
// import { WEBSOCKET_TAG, wrapWebSocket } from '../../../common/wrap/wrap-websocket'
|
|
11
|
+
|
|
9
12
|
class Instrument extends _instrumentBase.InstrumentBase {
|
|
10
|
-
static featureName =
|
|
11
|
-
constructor(agentIdentifier, aggregator) {
|
|
12
|
-
let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
13
|
+
static featureName = _constants.FEATURE_NAME;
|
|
14
|
+
constructor(agentIdentifier, aggregator, auto = true) {
|
|
13
15
|
super(agentIdentifier, aggregator, _constants.FEATURE_NAME, auto);
|
|
16
|
+
// wrapWebSocket(this.ee)
|
|
17
|
+
|
|
18
|
+
// WATCHABLE_WEB_SOCKET_EVENTS.forEach((suffix) => {
|
|
19
|
+
// this.ee.on(WEBSOCKET_TAG + suffix, (...args) => {
|
|
20
|
+
// handle('buffered-' + WEBSOCKET_TAG + suffix, [...args], undefined, this.featureName, this.ee)
|
|
21
|
+
// })
|
|
22
|
+
// })
|
|
23
|
+
|
|
14
24
|
this.importAggregator();
|
|
15
25
|
}
|
|
16
26
|
}
|
|
17
|
-
exports.Instrument = Instrument;
|
|
27
|
+
exports.Instrument = Instrument;
|
|
28
|
+
const Metrics = exports.Metrics = Instrument;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Instrument = void 0;
|
|
6
|
+
exports.PageAction = exports.Instrument = void 0;
|
|
7
7
|
var _generic_events = require("../../generic_events");
|
|
8
8
|
/*
|
|
9
9
|
* Copyright 2020 New Relic Corporation. All rights reserved.
|
|
@@ -14,9 +14,13 @@ var _generic_events = require("../../generic_events");
|
|
|
14
14
|
* @deprecated This feature has been replaced by Generic Events. Use/Import `GenericEvents` instead. This wrapper will be removed in a future release
|
|
15
15
|
*/
|
|
16
16
|
class Instrument extends _generic_events.GenericEvents {
|
|
17
|
-
constructor(agentIdentifier, aggregator) {
|
|
18
|
-
let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
17
|
+
constructor(agentIdentifier, aggregator, auto = true) {
|
|
19
18
|
super(agentIdentifier, aggregator, auto);
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated This feature has been replaced by Generic Events. Use/Import `GenericEvents` instead. This wrapper will be removed in a future release
|
|
24
|
+
*/
|
|
25
|
+
exports.Instrument = Instrument;
|
|
26
|
+
const PageAction = exports.PageAction = Instrument;
|
|
@@ -7,7 +7,8 @@ exports.Aggregate = void 0;
|
|
|
7
7
|
var _runtime = require("../../../common/constants/runtime");
|
|
8
8
|
var _navTiming = require("../../../common/timing/nav-timing");
|
|
9
9
|
var _stringify = require("../../../common/util/stringify");
|
|
10
|
-
var
|
|
10
|
+
var _info = require("../../../common/config/info");
|
|
11
|
+
var _runtime2 = require("../../../common/config/runtime");
|
|
11
12
|
var _harvest = require("../../../common/harvest/harvest");
|
|
12
13
|
var CONSTANTS = _interopRequireWildcard(require("../constants"));
|
|
13
14
|
var _initializedFeatures = require("./initialized-features");
|
|
@@ -17,32 +18,28 @@ var _aggregateBase = require("../../utils/aggregate-base");
|
|
|
17
18
|
var _firstContentfulPaint = require("../../../common/vitals/first-contentful-paint");
|
|
18
19
|
var _firstPaint = require("../../../common/vitals/first-paint");
|
|
19
20
|
var _timeToFirstByte = require("../../../common/vitals/time-to-first-byte");
|
|
20
|
-
var _drain = require("../../../common/drain/drain");
|
|
21
|
-
var _features = require("../../../loaders/features/features");
|
|
22
|
-
var _handle = require("../../../common/event-emitter/handle");
|
|
23
|
-
var _constants2 = require("../../metrics/constants");
|
|
24
21
|
var _now = require("../../../common/timing/now");
|
|
25
22
|
var _timeKeeper = require("../../../common/timing/time-keeper");
|
|
23
|
+
var _traverse = require("../../../common/util/traverse");
|
|
26
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
27
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
26
|
class Aggregate extends _aggregateBase.AggregateBase {
|
|
29
|
-
static featureName =
|
|
27
|
+
static featureName = CONSTANTS.FEATURE_NAME;
|
|
30
28
|
constructor(agentIdentifier, aggregator) {
|
|
31
29
|
super(agentIdentifier, aggregator, CONSTANTS.FEATURE_NAME);
|
|
32
30
|
this.timeToFirstByte = 0;
|
|
33
31
|
this.firstByteToWindowLoad = 0; // our "frontend" duration
|
|
34
32
|
this.firstByteToDomContent = 0; // our "dom processing" duration
|
|
35
33
|
this.timeKeeper = new _timeKeeper.TimeKeeper(this.agentIdentifier);
|
|
36
|
-
if (!(0,
|
|
34
|
+
if (!(0, _info.isValid)(agentIdentifier)) {
|
|
37
35
|
this.ee.abort();
|
|
38
36
|
return (0, _console.warn)(43);
|
|
39
37
|
}
|
|
40
38
|
if (_runtime.isBrowserScope) {
|
|
41
|
-
_timeToFirstByte.timeToFirstByte.subscribe(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} = _ref;
|
|
39
|
+
_timeToFirstByte.timeToFirstByte.subscribe(({
|
|
40
|
+
value,
|
|
41
|
+
attrs
|
|
42
|
+
}) => {
|
|
46
43
|
const navEntry = attrs.navigationEntry;
|
|
47
44
|
this.timeToFirstByte = Math.max(value, this.timeToFirstByte);
|
|
48
45
|
this.firstByteToWindowLoad = Math.max(Math.round(navEntry.loadEventEnd - this.timeToFirstByte), this.firstByteToWindowLoad); // our "frontend" duration
|
|
@@ -56,8 +53,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
sendRum() {
|
|
59
|
-
const info = (0,
|
|
60
|
-
const agentRuntime = (0,
|
|
56
|
+
const info = (0, _info.getInfo)(this.agentIdentifier);
|
|
57
|
+
const agentRuntime = (0, _runtime2.getRuntime)(this.agentIdentifier);
|
|
61
58
|
const harvester = new _harvest.Harvest(this);
|
|
62
59
|
if (info.queueTime) this.aggregator.store('measures', 'qt', {
|
|
63
60
|
value: info.queueTime
|
|
@@ -84,8 +81,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
84
81
|
ac: info.account,
|
|
85
82
|
pr: info.product,
|
|
86
83
|
af: (0, _initializedFeatures.getActivatedFeaturesFlags)(this.agentIdentifier).join(','),
|
|
87
|
-
...Object.entries(this.aggregator.get('measures') || {}).reduce((aggregator,
|
|
88
|
-
let [metricName, measure] = _ref2;
|
|
84
|
+
...Object.entries(this.aggregator.get('measures') || {}).reduce((aggregator, [metricName, measure]) => {
|
|
89
85
|
aggregator[metricName] = measure.params?.value;
|
|
90
86
|
return aggregator;
|
|
91
87
|
}, {}),
|
|
@@ -97,9 +93,9 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
97
93
|
|
|
98
94
|
let body;
|
|
99
95
|
if (typeof info.jsAttributes === 'object' && Object.keys(info.jsAttributes).length > 0) {
|
|
100
|
-
body = {
|
|
96
|
+
body = (0, _traverse.applyFnToProps)({
|
|
101
97
|
ja: info.jsAttributes
|
|
102
|
-
};
|
|
98
|
+
}, this.obfuscator.obfuscateString.bind(this.obfuscator), 'string');
|
|
103
99
|
}
|
|
104
100
|
if (_runtime.globalScope.performance) {
|
|
105
101
|
if (typeof PerformanceNavigationTiming !== 'undefined') {
|
|
@@ -122,7 +118,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
122
118
|
queryParameters.fp = _firstPaint.firstPaint.current.value;
|
|
123
119
|
queryParameters.fcp = _firstContentfulPaint.firstContentfulPaint.current.value;
|
|
124
120
|
if (this.timeKeeper?.ready) {
|
|
125
|
-
queryParameters.timestamp = this.timeKeeper.convertRelativeTimestamp((0, _now.now)());
|
|
121
|
+
queryParameters.timestamp = Math.floor(this.timeKeeper.correctAbsoluteTimestamp(this.timeKeeper.convertRelativeTimestamp((0, _now.now)())));
|
|
126
122
|
}
|
|
127
123
|
const rumStartTime = (0, _now.now)();
|
|
128
124
|
harvester.send({
|
|
@@ -135,12 +131,11 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
135
131
|
needResponse: true,
|
|
136
132
|
sendEmptyBody: true
|
|
137
133
|
},
|
|
138
|
-
cbFinished:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} = _ref3;
|
|
134
|
+
cbFinished: ({
|
|
135
|
+
status,
|
|
136
|
+
responseText,
|
|
137
|
+
xhr
|
|
138
|
+
}) => {
|
|
144
139
|
const rumEndTime = (0, _now.now)();
|
|
145
140
|
if (status >= 400 || status === 0) {
|
|
146
141
|
// Adding retry logic for the rum call will be a separate change
|
|
@@ -151,22 +146,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
151
146
|
this.timeKeeper.processRumRequest(xhr, rumStartTime, rumEndTime);
|
|
152
147
|
if (!this.timeKeeper.ready) throw new Error('TimeKeeper not ready');
|
|
153
148
|
agentRuntime.timeKeeper = this.timeKeeper;
|
|
154
|
-
|
|
155
|
-
// Check if the time diff is such that we need to capture a supportability metric
|
|
156
|
-
if (this.timeKeeper.localTimeDiff >= 12 * 60 * 60 * 1000) {
|
|
157
|
-
(0, _handle.handle)(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['PVE/NRTime/Calculation/DiffExceed12Hrs'], undefined, _features.FEATURE_NAMES.metrics, this.ee);
|
|
158
|
-
} else if (this.timeKeeper.localTimeDiff >= 6 * 60 * 60 * 1000) {
|
|
159
|
-
(0, _handle.handle)(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['PVE/NRTime/Calculation/DiffExceed6Hrs'], undefined, _features.FEATURE_NAMES.metrics, this.ee);
|
|
160
|
-
} else if (this.timeKeeper.localTimeDiff >= 60 * 60 * 1000) {
|
|
161
|
-
(0, _handle.handle)(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['PVE/NRTime/Calculation/DiffExceed1Hrs'], undefined, _features.FEATURE_NAMES.metrics, this.ee);
|
|
162
|
-
}
|
|
163
149
|
} catch (error) {
|
|
164
|
-
if (error?.message?.indexOf('invalid format') > 0) {
|
|
165
|
-
(0, _handle.handle)(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['PVE/NRTime/Calculation/InvalidFormat'], undefined, _features.FEATURE_NAMES.metrics, this.ee);
|
|
166
|
-
} else {
|
|
167
|
-
(0, _handle.handle)(_constants2.SUPPORTABILITY_METRIC_CHANNEL, ['PVE/NRTime/Calculation/Failed'], undefined, _features.FEATURE_NAMES.metrics, this.ee);
|
|
168
|
-
}
|
|
169
|
-
(0, _drain.drain)(this.agentIdentifier, _features.FEATURE_NAMES.metrics, true);
|
|
170
150
|
this.ee.abort();
|
|
171
151
|
(0, _console.warn)(17, error);
|
|
172
152
|
return;
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Instrument = void 0;
|
|
6
|
+
exports.PageViewEvent = exports.Instrument = void 0;
|
|
7
7
|
var _instrumentBase = require("../../utils/instrument-base");
|
|
8
8
|
var CONSTANTS = _interopRequireWildcard(require("../constants"));
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
class Instrument extends _instrumentBase.InstrumentBase {
|
|
12
|
-
static featureName =
|
|
13
|
-
constructor(agentIdentifier, aggregator) {
|
|
14
|
-
let auto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
12
|
+
static featureName = CONSTANTS.FEATURE_NAME;
|
|
13
|
+
constructor(agentIdentifier, aggregator, auto = true) {
|
|
15
14
|
super(agentIdentifier, aggregator, CONSTANTS.FEATURE_NAME, auto);
|
|
16
15
|
this.importAggregator();
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
exports.Instrument = Instrument;
|
|
18
|
+
exports.Instrument = Instrument;
|
|
19
|
+
const PageViewEvent = exports.PageViewEvent = Instrument;
|