@newrelic/browser-agent 1.270.0 → 1.270.2
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 +14 -0
- package/dist/cjs/common/config/runtime.js +0 -1
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/features/logging/shared/log.js +1 -1
- package/dist/cjs/features/session_trace/aggregate/trace/storage.js +1 -1
- package/dist/cjs/features/spa/aggregate/index.js +2 -2
- package/dist/cjs/features/spa/aggregate/interaction.js +2 -2
- package/dist/esm/common/config/runtime.js +1 -2
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/logging/shared/log.js +2 -2
- package/dist/esm/features/session_trace/aggregate/trace/storage.js +1 -1
- package/dist/esm/features/spa/aggregate/index.js +3 -3
- package/dist/esm/features/spa/aggregate/interaction.js +2 -2
- package/dist/types/common/config/runtime.d.ts.map +1 -1
- package/dist/types/features/spa/aggregate/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/common/config/runtime.js +1 -2
- package/src/features/logging/shared/log.js +2 -2
- package/src/features/session_trace/aggregate/trace/storage.js +1 -1
- package/src/features/spa/aggregate/index.js +3 -3
- package/src/features/spa/aggregate/interaction.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.270.2](https://github.com/newrelic/newrelic-browser-agent/compare/v1.270.1...v1.270.2) (2024-10-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Correct naming for logging pageUrl attribute ([#1225](https://github.com/newrelic/newrelic-browser-agent/issues/1225)) ([95f5a77](https://github.com/newrelic/newrelic-browser-agent/commit/95f5a77c60221c0eda61a42f33648f5a2791891f))
|
|
12
|
+
|
|
13
|
+
## [1.270.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.270.0...v1.270.1) (2024-10-23)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* Remove undefined agentRuntime in Session Trace ([#1227](https://github.com/newrelic/newrelic-browser-agent/issues/1227)) ([dc5938f](https://github.com/newrelic/newrelic-browser-agent/commit/dc5938f26e43686759de976d4631b22f112b71e8))
|
|
19
|
+
|
|
6
20
|
## [1.270.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.269.0...v1.270.0) (2024-10-22)
|
|
7
21
|
|
|
8
22
|
|
|
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
12
12
|
/**
|
|
13
13
|
* Exposes the version of the agent
|
|
14
14
|
*/
|
|
15
|
-
const VERSION = exports.VERSION = "1.270.
|
|
15
|
+
const VERSION = exports.VERSION = "1.270.2";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the build type of the agent
|
|
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
12
12
|
/**
|
|
13
13
|
* Exposes the version of the agent
|
|
14
14
|
*/
|
|
15
|
-
const VERSION = exports.VERSION = "1.270.
|
|
15
|
+
const VERSION = exports.VERSION = "1.270.2";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the build type of the agent
|
|
@@ -29,7 +29,7 @@ class Log {
|
|
|
29
29
|
this.message = message;
|
|
30
30
|
this.attributes = {
|
|
31
31
|
...attributes,
|
|
32
|
-
pageUrl: (0, _cleanUrl.cleanURL)('' + _runtime.
|
|
32
|
+
pageUrl: (0, _cleanUrl.cleanURL)('' + _runtime.initialLocation)
|
|
33
33
|
};
|
|
34
34
|
this.level = level.toUpperCase();
|
|
35
35
|
}
|
|
@@ -52,7 +52,7 @@ class TraceStorage {
|
|
|
52
52
|
if (this.parent.blocked) return;
|
|
53
53
|
if (this.nodeCount >= _constants2.MAX_NODES_PER_HARVEST) {
|
|
54
54
|
// limit the amount of pending data awaiting next harvest
|
|
55
|
-
if (this.parent.
|
|
55
|
+
if (this.parent.mode !== _constants.MODE.ERROR) return;
|
|
56
56
|
const openedSpace = this.trimSTNs(ERROR_MODE_SECONDS_WINDOW); // but maybe we could make some space by discarding irrelevant nodes if we're in sessioned Error mode
|
|
57
57
|
if (openedSpace === 0) return;
|
|
58
58
|
}
|
|
@@ -56,8 +56,8 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
56
56
|
constructor(agentRef) {
|
|
57
57
|
super(agentRef, FEATURE_NAME);
|
|
58
58
|
this.state = {
|
|
59
|
-
initialPageURL:
|
|
60
|
-
lastSeenUrl:
|
|
59
|
+
initialPageURL: _runtime.initialLocation,
|
|
60
|
+
lastSeenUrl: _runtime.initialLocation,
|
|
61
61
|
lastSeenRouteName: null,
|
|
62
62
|
timerMap: {},
|
|
63
63
|
timerBudget: MAX_TIMER_BUDGET,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Interaction = Interaction;
|
|
7
7
|
var _info = require("../../../common/config/info");
|
|
8
|
-
var _runtime = require("../../../common/
|
|
8
|
+
var _runtime = require("../../../common/constants/runtime");
|
|
9
9
|
var _nreum = require("../../../common/window/nreum");
|
|
10
10
|
var _contextualEe = require("../../../common/event-emitter/contextual-ee");
|
|
11
11
|
var _interactionNode = require("./interaction-node");
|
|
@@ -34,7 +34,7 @@ function Interaction(eventName, timestamp, url, routeName, onFinished, agentIden
|
|
|
34
34
|
var root = this.root = new _interactionNode.InteractionNode(this, null, 'interaction', timestamp);
|
|
35
35
|
var attrs = root.attrs;
|
|
36
36
|
attrs.trigger = eventName;
|
|
37
|
-
attrs.initialPageURL =
|
|
37
|
+
attrs.initialPageURL = _runtime.initialLocation;
|
|
38
38
|
attrs.oldRoute = routeName;
|
|
39
39
|
attrs.newURL = attrs.oldURL = url;
|
|
40
40
|
attrs.custom = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getModeledObject } from './configurable';
|
|
2
2
|
import { getNREUMInitializedAgent } from '../window/nreum';
|
|
3
|
-
import {
|
|
3
|
+
import { originTime } from '../constants/runtime';
|
|
4
4
|
import { BUILD_ENV, DIST_METHOD, VERSION } from "../constants/env.npm";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -21,7 +21,6 @@ const model = {
|
|
|
21
21
|
loaderType: undefined,
|
|
22
22
|
maxBytes: 30000,
|
|
23
23
|
onerror: undefined,
|
|
24
|
-
origin: '' + globalScope.location,
|
|
25
24
|
ptid: undefined,
|
|
26
25
|
releaseIds: {},
|
|
27
26
|
/** Agent-specific metadata found in the RUM call response. ex. entityGuid */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { initialLocation } from '../../../common/constants/runtime';
|
|
2
2
|
import { cleanURL } from '../../../common/url/clean-url';
|
|
3
3
|
import { LOG_LEVELS } from '../constants';
|
|
4
4
|
export class Log {
|
|
@@ -23,7 +23,7 @@ export class Log {
|
|
|
23
23
|
this.message = message;
|
|
24
24
|
this.attributes = {
|
|
25
25
|
...attributes,
|
|
26
|
-
pageUrl: cleanURL('' +
|
|
26
|
+
pageUrl: cleanURL('' + initialLocation)
|
|
27
27
|
};
|
|
28
28
|
this.level = level.toUpperCase();
|
|
29
29
|
}
|
|
@@ -46,7 +46,7 @@ export class TraceStorage {
|
|
|
46
46
|
if (this.parent.blocked) return;
|
|
47
47
|
if (this.nodeCount >= MAX_NODES_PER_HARVEST) {
|
|
48
48
|
// limit the amount of pending data awaiting next harvest
|
|
49
|
-
if (this.parent.
|
|
49
|
+
if (this.parent.mode !== MODE.ERROR) return;
|
|
50
50
|
const openedSpace = this.trimSTNs(ERROR_MODE_SECONDS_WINDOW); // but maybe we could make some space by discarding irrelevant nodes if we're in sessioned Error mode
|
|
51
51
|
if (openedSpace === 0) return;
|
|
52
52
|
}
|
|
@@ -19,7 +19,7 @@ import { AggregateBase } from '../../utils/aggregate-base';
|
|
|
19
19
|
import { firstContentfulPaint } from '../../../common/vitals/first-contentful-paint';
|
|
20
20
|
import { firstPaint } from '../../../common/vitals/first-paint';
|
|
21
21
|
import { bundleId } from '../../../common/ids/bundle-id';
|
|
22
|
-
import { loadedAsDeferredBrowserScript } from '../../../common/constants/runtime';
|
|
22
|
+
import { initialLocation, loadedAsDeferredBrowserScript } from '../../../common/constants/runtime';
|
|
23
23
|
import { handle } from '../../../common/event-emitter/handle';
|
|
24
24
|
import { SUPPORTABILITY_METRIC_CHANNEL } from '../../metrics/constants';
|
|
25
25
|
import { warn } from '../../../common/util/console';
|
|
@@ -47,8 +47,8 @@ export class Aggregate extends AggregateBase {
|
|
|
47
47
|
constructor(agentRef) {
|
|
48
48
|
super(agentRef, FEATURE_NAME);
|
|
49
49
|
this.state = {
|
|
50
|
-
initialPageURL:
|
|
51
|
-
lastSeenUrl:
|
|
50
|
+
initialPageURL: initialLocation,
|
|
51
|
+
lastSeenUrl: initialLocation,
|
|
52
52
|
lastSeenRouteName: null,
|
|
53
53
|
timerMap: {},
|
|
54
54
|
timerBudget: MAX_TIMER_BUDGET,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { getInfo } from '../../../common/config/info';
|
|
7
|
-
import {
|
|
7
|
+
import { initialLocation } from '../../../common/constants/runtime';
|
|
8
8
|
import { gosNREUMOriginals } from '../../../common/window/nreum';
|
|
9
9
|
import { ee } from '../../../common/event-emitter/contextual-ee';
|
|
10
10
|
import { InteractionNode } from './interaction-node';
|
|
@@ -28,7 +28,7 @@ export function Interaction(eventName, timestamp, url, routeName, onFinished, ag
|
|
|
28
28
|
var root = this.root = new InteractionNode(this, null, 'interaction', timestamp);
|
|
29
29
|
var attrs = root.attrs;
|
|
30
30
|
attrs.trigger = eventName;
|
|
31
|
-
attrs.initialPageURL =
|
|
31
|
+
attrs.initialPageURL = initialLocation;
|
|
32
32
|
attrs.oldRoute = routeName;
|
|
33
33
|
attrs.newURL = attrs.oldURL = url;
|
|
34
34
|
attrs.custom = {};
|
|
@@ -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":"AAqCA,yCAIC;AAED,oDAgBC"}
|
|
@@ -2,8 +2,8 @@ export class Aggregate extends AggregateBase {
|
|
|
2
2
|
static featureName: string;
|
|
3
3
|
constructor(agentRef: any);
|
|
4
4
|
state: {
|
|
5
|
-
initialPageURL:
|
|
6
|
-
lastSeenUrl:
|
|
5
|
+
initialPageURL: string;
|
|
6
|
+
lastSeenUrl: string;
|
|
7
7
|
lastSeenRouteName: null;
|
|
8
8
|
timerMap: {};
|
|
9
9
|
timerBudget: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getModeledObject } from './configurable'
|
|
2
2
|
import { getNREUMInitializedAgent } from '../window/nreum'
|
|
3
|
-
import {
|
|
3
|
+
import { originTime } from '../constants/runtime'
|
|
4
4
|
import { BUILD_ENV, DIST_METHOD, VERSION } from '../constants/env'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -23,7 +23,6 @@ const model = {
|
|
|
23
23
|
loaderType: undefined,
|
|
24
24
|
maxBytes: 30000,
|
|
25
25
|
onerror: undefined,
|
|
26
|
-
origin: '' + globalScope.location,
|
|
27
26
|
ptid: undefined,
|
|
28
27
|
releaseIds: {},
|
|
29
28
|
/** Agent-specific metadata found in the RUM call response. ex. entityGuid */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { initialLocation } from '../../../common/constants/runtime'
|
|
2
2
|
import { cleanURL } from '../../../common/url/clean-url'
|
|
3
3
|
import { LOG_LEVELS } from '../constants'
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ export class Log {
|
|
|
22
22
|
/** @type {long} */
|
|
23
23
|
this.timestamp = timestamp
|
|
24
24
|
this.message = message
|
|
25
|
-
this.attributes = { ...attributes, pageUrl: cleanURL('' +
|
|
25
|
+
this.attributes = { ...attributes, pageUrl: cleanURL('' + initialLocation) }
|
|
26
26
|
this.level = level.toUpperCase()
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -40,7 +40,7 @@ export class TraceStorage {
|
|
|
40
40
|
storeSTN (stn) {
|
|
41
41
|
if (this.parent.blocked) return
|
|
42
42
|
if (this.nodeCount >= MAX_NODES_PER_HARVEST) { // limit the amount of pending data awaiting next harvest
|
|
43
|
-
if (this.parent.
|
|
43
|
+
if (this.parent.mode !== MODE.ERROR) return
|
|
44
44
|
const openedSpace = this.trimSTNs(ERROR_MODE_SECONDS_WINDOW) // but maybe we could make some space by discarding irrelevant nodes if we're in sessioned Error mode
|
|
45
45
|
if (openedSpace === 0) return
|
|
46
46
|
}
|
|
@@ -19,7 +19,7 @@ import { AggregateBase } from '../../utils/aggregate-base'
|
|
|
19
19
|
import { firstContentfulPaint } from '../../../common/vitals/first-contentful-paint'
|
|
20
20
|
import { firstPaint } from '../../../common/vitals/first-paint'
|
|
21
21
|
import { bundleId } from '../../../common/ids/bundle-id'
|
|
22
|
-
import { loadedAsDeferredBrowserScript } from '../../../common/constants/runtime'
|
|
22
|
+
import { initialLocation, loadedAsDeferredBrowserScript } from '../../../common/constants/runtime'
|
|
23
23
|
import { handle } from '../../../common/event-emitter/handle'
|
|
24
24
|
import { SUPPORTABILITY_METRIC_CHANNEL } from '../../metrics/constants'
|
|
25
25
|
import { warn } from '../../../common/util/console'
|
|
@@ -35,8 +35,8 @@ export class Aggregate extends AggregateBase {
|
|
|
35
35
|
super(agentRef, FEATURE_NAME)
|
|
36
36
|
|
|
37
37
|
this.state = {
|
|
38
|
-
initialPageURL:
|
|
39
|
-
lastSeenUrl:
|
|
38
|
+
initialPageURL: initialLocation,
|
|
39
|
+
lastSeenUrl: initialLocation,
|
|
40
40
|
lastSeenRouteName: null,
|
|
41
41
|
timerMap: {},
|
|
42
42
|
timerBudget: MAX_TIMER_BUDGET,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { getInfo } from '../../../common/config/info'
|
|
7
|
-
import {
|
|
7
|
+
import { initialLocation } from '../../../common/constants/runtime'
|
|
8
8
|
import { gosNREUMOriginals } from '../../../common/window/nreum'
|
|
9
9
|
import { ee } from '../../../common/event-emitter/contextual-ee'
|
|
10
10
|
import { InteractionNode } from './interaction-node'
|
|
@@ -34,7 +34,7 @@ export function Interaction (eventName, timestamp, url, routeName, onFinished, a
|
|
|
34
34
|
var attrs = root.attrs
|
|
35
35
|
|
|
36
36
|
attrs.trigger = eventName
|
|
37
|
-
attrs.initialPageURL =
|
|
37
|
+
attrs.initialPageURL = initialLocation
|
|
38
38
|
attrs.oldRoute = routeName
|
|
39
39
|
attrs.newURL = attrs.oldURL = url
|
|
40
40
|
attrs.custom = {}
|