@newrelic/browser-agent 1.244.0 → 1.246.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 +23 -0
- package/dist/cjs/cdn/polyfills.js +5 -1
- package/dist/cjs/common/config/state/configurable.js +1 -1
- package/dist/cjs/common/config/state/init.js +1 -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/session/session-entity.js +3 -2
- package/dist/cjs/common/url/parse-url.js +21 -44
- package/dist/cjs/common/util/type-check.js +14 -0
- package/dist/cjs/common/vitals/first-input-delay.js +1 -2
- package/dist/cjs/common/vitals/largest-contentful-paint.js +1 -2
- package/dist/cjs/common/vitals/vital-metric.js +2 -12
- package/dist/cjs/features/ajax/aggregate/gql.js +94 -0
- package/dist/cjs/features/ajax/aggregate/index.js +13 -1
- package/dist/cjs/features/ajax/instrument/index.js +2 -0
- package/dist/cjs/features/jserrors/aggregate/index.js +1 -1
- package/dist/cjs/features/page_view_event/aggregate/index.js +2 -0
- package/dist/cjs/features/page_view_timing/aggregate/index.js +10 -1
- package/dist/cjs/features/session_replay/aggregate/index.js +6 -6
- package/dist/cjs/features/session_trace/aggregate/index.js +14 -3
- package/dist/cjs/features/spa/aggregate/index.js +5 -3
- package/dist/cjs/features/spa/aggregate/serializer.js +7 -0
- package/dist/cjs/features/utils/instrument-base.js +1 -1
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/loaders/api/api.js +2 -2
- package/dist/esm/cdn/polyfills.js +5 -1
- package/dist/esm/common/config/state/configurable.js +1 -1
- package/dist/esm/common/config/state/init.js +1 -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/session/session-entity.js +3 -2
- package/dist/esm/common/url/parse-url.js +22 -45
- package/dist/esm/common/util/type-check.js +8 -0
- package/dist/esm/common/vitals/first-input-delay.js +1 -2
- package/dist/esm/common/vitals/largest-contentful-paint.js +1 -2
- package/dist/esm/common/vitals/vital-metric.js +1 -11
- package/dist/esm/features/ajax/aggregate/gql.js +89 -0
- package/dist/esm/features/ajax/aggregate/index.js +13 -1
- package/dist/esm/features/ajax/instrument/index.js +2 -0
- package/dist/esm/features/jserrors/aggregate/index.js +1 -1
- package/dist/esm/features/page_view_event/aggregate/index.js +2 -0
- package/dist/esm/features/page_view_timing/aggregate/index.js +9 -0
- package/dist/esm/features/session_replay/aggregate/index.js +6 -6
- package/dist/esm/features/session_trace/aggregate/index.js +14 -3
- package/dist/esm/features/spa/aggregate/index.js +5 -3
- package/dist/esm/features/spa/aggregate/serializer.js +7 -0
- package/dist/esm/features/utils/instrument-base.js +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/loaders/api/api.js +2 -2
- package/dist/types/common/config/state/configurable.d.ts.map +1 -1
- package/dist/types/common/config/state/init.d.ts.map +1 -1
- package/dist/types/common/session/session-entity.d.ts.map +1 -1
- package/dist/types/common/url/parse-url.d.ts +12 -1
- package/dist/types/common/url/parse-url.d.ts.map +1 -1
- package/dist/types/common/util/type-check.d.ts +7 -0
- package/dist/types/common/util/type-check.d.ts.map +1 -0
- package/dist/types/common/vitals/vital-metric.d.ts +1 -2
- package/dist/types/common/vitals/vital-metric.d.ts.map +1 -1
- package/dist/types/features/ajax/aggregate/gql.d.ts +29 -0
- package/dist/types/features/ajax/aggregate/gql.d.ts.map +1 -0
- package/dist/types/features/ajax/aggregate/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_timing/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/session_trace/aggregate/index.d.ts +1 -0
- package/dist/types/features/session_trace/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts +1 -0
- package/dist/types/features/spa/aggregate/index.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/serializer.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/loaders/configure/public-path.npm.d.ts.map +1 -1
- package/package.json +1 -9
- package/src/cdn/polyfills.js +4 -0
- package/src/common/config/state/configurable.js +2 -1
- package/src/common/config/state/init.js +1 -0
- package/src/common/session/session-entity.js +3 -2
- package/src/common/url/parse-url.js +22 -50
- package/src/common/util/type-check.js +8 -0
- package/src/common/vitals/first-input-delay.js +1 -2
- package/src/common/vitals/largest-contentful-paint.js +1 -2
- package/src/common/vitals/vital-metric.js +2 -12
- package/src/features/ajax/aggregate/gql.js +95 -0
- package/src/features/ajax/aggregate/index.js +11 -1
- package/src/features/ajax/instrument/index.js +3 -0
- package/src/features/jserrors/aggregate/index.js +1 -1
- package/src/features/page_view_event/aggregate/index.js +2 -0
- package/src/features/page_view_timing/aggregate/index.js +11 -0
- package/src/features/session_replay/aggregate/index.js +6 -6
- package/src/features/session_trace/aggregate/index.js +10 -2
- package/src/features/spa/aggregate/index.js +5 -3
- package/src/features/spa/aggregate/serializer.js +7 -1
- package/src/features/utils/instrument-base.js +1 -1
- package/src/index.js +0 -1
- package/src/loaders/api/api.js +2 -2
- package/src/loaders/configure/public-path.npm.js +0 -1
- package/dist/cjs/cdn/worker.js +0 -16
- package/dist/cjs/loaders/worker-agent.js +0 -24
- package/dist/esm/cdn/worker.js +0 -14
- package/dist/esm/loaders/worker-agent.js +0 -18
- package/dist/types/cdn/worker.d.ts +0 -2
- package/dist/types/cdn/worker.d.ts.map +0 -1
- package/dist/types/loaders/worker-agent.d.ts +0 -8
- package/dist/types/loaders/worker-agent.d.ts.map +0 -1
- package/src/cdn/worker.js +0 -21
- package/src/loaders/worker-agent.js +0 -24
package/src/index.js
CHANGED
package/src/loaders/api/api.js
CHANGED
|
@@ -89,8 +89,8 @@ export function setAPI (agentIdentifier, forceDrain) {
|
|
|
89
89
|
warn(`Failed to execute setCustomAttribute.\nName must be a string type, but a type of <${typeof name}> was provided.`)
|
|
90
90
|
return
|
|
91
91
|
}
|
|
92
|
-
if (!(['string', 'number'].includes(typeof value) || value === null)) {
|
|
93
|
-
warn(`Failed to execute setCustomAttribute.\nNon-null value must be a string or
|
|
92
|
+
if (!(['string', 'number', 'boolean'].includes(typeof value) || value === null)) {
|
|
93
|
+
warn(`Failed to execute setCustomAttribute.\nNon-null value must be a string, number or boolean type, but a type of <${typeof value}> was provided.`)
|
|
94
94
|
return
|
|
95
95
|
}
|
|
96
96
|
return appendJsAttribute(name, value, 'setCustomAttribute', persistAttribute)
|
package/dist/cjs/cdn/worker.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _agent = require("../loaders/agent");
|
|
4
|
-
var _instrument = require("../features/metrics/instrument");
|
|
5
|
-
var _instrument2 = require("../features/jserrors/instrument");
|
|
6
|
-
var _instrument3 = require("../features/ajax/instrument");
|
|
7
|
-
var _instrument4 = require("../features/page_action/instrument");
|
|
8
|
-
/**
|
|
9
|
-
* @file Creates a "Worker" agent loader bundle composed of the core Agent and the subset of feature modules applicable
|
|
10
|
-
* in a service worker context.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
new _agent.Agent({
|
|
14
|
-
features: [_instrument.Instrument, _instrument2.Instrument, _instrument3.Instrument, _instrument4.Instrument],
|
|
15
|
-
loaderType: 'worker'
|
|
16
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.WorkerAgent = void 0;
|
|
7
|
-
var _agent = require("./agent");
|
|
8
|
-
var _instrument = require("../features/metrics/instrument");
|
|
9
|
-
var _instrument2 = require("../features/jserrors/instrument");
|
|
10
|
-
var _instrument3 = require("../features/ajax/instrument");
|
|
11
|
-
var _instrument4 = require("../features/page_action/instrument");
|
|
12
|
-
/**
|
|
13
|
-
* A streamlined agent class designed for the service worker context, limited to features relevant in that scope.
|
|
14
|
-
*/
|
|
15
|
-
class WorkerAgent extends _agent.Agent {
|
|
16
|
-
constructor(args) {
|
|
17
|
-
super({
|
|
18
|
-
...args,
|
|
19
|
-
features: [_instrument.Instrument, _instrument2.Instrument, _instrument3.Instrument, _instrument4.Instrument],
|
|
20
|
-
loaderType: 'worker-agent'
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.WorkerAgent = WorkerAgent;
|
package/dist/esm/cdn/worker.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Creates a "Worker" agent loader bundle composed of the core Agent and the subset of feature modules applicable
|
|
3
|
-
* in a service worker context.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Agent } from '../loaders/agent';
|
|
7
|
-
import { Instrument as InstrumentMetrics } from '../features/metrics/instrument';
|
|
8
|
-
import { Instrument as InstrumentErrors } from '../features/jserrors/instrument';
|
|
9
|
-
import { Instrument as InstrumentXhr } from '../features/ajax/instrument';
|
|
10
|
-
import { Instrument as InstrumentPageAction } from '../features/page_action/instrument';
|
|
11
|
-
new Agent({
|
|
12
|
-
features: [InstrumentMetrics, InstrumentErrors, InstrumentXhr, InstrumentPageAction],
|
|
13
|
-
loaderType: 'worker'
|
|
14
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Agent } from './agent';
|
|
2
|
-
import { Instrument as InstrumentMetrics } from '../features/metrics/instrument';
|
|
3
|
-
import { Instrument as InstrumentErrors } from '../features/jserrors/instrument';
|
|
4
|
-
import { Instrument as InstrumentXhr } from '../features/ajax/instrument';
|
|
5
|
-
import { Instrument as InstrumentPageAction } from '../features/page_action/instrument';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A streamlined agent class designed for the service worker context, limited to features relevant in that scope.
|
|
9
|
-
*/
|
|
10
|
-
export class WorkerAgent extends Agent {
|
|
11
|
-
constructor(args) {
|
|
12
|
-
super({
|
|
13
|
-
...args,
|
|
14
|
-
features: [InstrumentMetrics, InstrumentErrors, InstrumentXhr, InstrumentPageAction],
|
|
15
|
-
loaderType: 'worker-agent'
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/cdn/worker.js"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A streamlined agent class designed for the service worker context, limited to features relevant in that scope.
|
|
3
|
-
*/
|
|
4
|
-
export class WorkerAgent extends Agent {
|
|
5
|
-
constructor(args: any);
|
|
6
|
-
}
|
|
7
|
-
import { Agent } from './agent';
|
|
8
|
-
//# sourceMappingURL=worker-agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/worker-agent.js"],"names":[],"mappings":"AAOA;;GAEG;AACH;IACE,uBAWC;CACF;sBAvBqB,SAAS"}
|
package/src/cdn/worker.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Creates a "Worker" agent loader bundle composed of the core Agent and the subset of feature modules applicable
|
|
3
|
-
* in a service worker context.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Agent } from '../loaders/agent'
|
|
7
|
-
|
|
8
|
-
import { Instrument as InstrumentMetrics } from '../features/metrics/instrument'
|
|
9
|
-
import { Instrument as InstrumentErrors } from '../features/jserrors/instrument'
|
|
10
|
-
import { Instrument as InstrumentXhr } from '../features/ajax/instrument'
|
|
11
|
-
import { Instrument as InstrumentPageAction } from '../features/page_action/instrument'
|
|
12
|
-
|
|
13
|
-
new Agent({
|
|
14
|
-
features: [
|
|
15
|
-
InstrumentMetrics,
|
|
16
|
-
InstrumentErrors,
|
|
17
|
-
InstrumentXhr,
|
|
18
|
-
InstrumentPageAction
|
|
19
|
-
],
|
|
20
|
-
loaderType: 'worker'
|
|
21
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Agent } from './agent'
|
|
2
|
-
|
|
3
|
-
import { Instrument as InstrumentMetrics } from '../features/metrics/instrument'
|
|
4
|
-
import { Instrument as InstrumentErrors } from '../features/jserrors/instrument'
|
|
5
|
-
import { Instrument as InstrumentXhr } from '../features/ajax/instrument'
|
|
6
|
-
import { Instrument as InstrumentPageAction } from '../features/page_action/instrument'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* A streamlined agent class designed for the service worker context, limited to features relevant in that scope.
|
|
10
|
-
*/
|
|
11
|
-
export class WorkerAgent extends Agent {
|
|
12
|
-
constructor (args) {
|
|
13
|
-
super({
|
|
14
|
-
...args,
|
|
15
|
-
features: [
|
|
16
|
-
InstrumentMetrics,
|
|
17
|
-
InstrumentErrors,
|
|
18
|
-
InstrumentXhr,
|
|
19
|
-
InstrumentPageAction
|
|
20
|
-
],
|
|
21
|
-
loaderType: 'worker-agent'
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
}
|