@newrelic/browser-agent 1.297.0-rc.1 → 1.297.0-rc.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/README.md +3 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/loaders/micro-agent.js +5 -2
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/loaders/micro-agent.js +5 -2
- package/dist/types/loaders/micro-agent.d.ts +5 -2
- package/dist/types/loaders/micro-agent.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/loaders/micro-agent.js +5 -2
package/README.md
CHANGED
|
@@ -245,6 +245,9 @@ browserAgent.recordCustomEvent(...)
|
|
|
245
245
|
|
|
246
246
|
## Deploying one or more "micro" agents per page
|
|
247
247
|
|
|
248
|
+
> **ℹ️ Note:**
|
|
249
|
+
> This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to browser-agent@newrelic.com for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
|
|
250
|
+
|
|
248
251
|
The examples above use the `Agent` class at their core, which is ideal for most cases as it will automatically detect page-level events across your web application.
|
|
249
252
|
|
|
250
253
|
Using the `MicroAgent` class, it is possible to skip the "auto" instrumentation phases of the other loader types, and provide a *very small* agent designed for capturing data in a controlled manner via the API interfaces. The `MicroAgent` captures a distinct `PageView` event when instantiated, and additional `PageAction` and `JavaScriptError` events may be captured by calling the `noticeError` and `addPageAction` methods.
|
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.297.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.297.0-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.297.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.297.0-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -33,10 +33,13 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
33
33
|
const nonAutoFeatures = [_features.FEATURE_NAMES.jserrors, _features.FEATURE_NAMES.genericEvents, _features.FEATURE_NAMES.metrics, _features.FEATURE_NAMES.logging];
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* --- A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
36
|
+
* A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
38
37
|
* automatically instrument. Instead, each MicroAgent instance will lazy load the required features and can support loading multiple instances on one page.
|
|
39
38
|
* Out of the box, it can manually handle and report Page View, Page Action, and Error events.
|
|
39
|
+
*
|
|
40
|
+
* @note This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to browser-agent@newrelic.com for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://www.npmjs.com/package/@newrelic/browser-agent#deploying-one-or-more-micro-agents-per-page} for more information in the documentation.
|
|
40
43
|
*/
|
|
41
44
|
class MicroAgent extends _microAgentBase.MicroAgentBase {
|
|
42
45
|
/**
|
|
@@ -28,10 +28,13 @@ import { setupWrapLoggerAPI } from './api/wrapLogger';
|
|
|
28
28
|
const nonAutoFeatures = [FEATURE_NAMES.jserrors, FEATURE_NAMES.genericEvents, FEATURE_NAMES.metrics, FEATURE_NAMES.logging];
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* --- A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
31
|
+
* A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
33
32
|
* automatically instrument. Instead, each MicroAgent instance will lazy load the required features and can support loading multiple instances on one page.
|
|
34
33
|
* Out of the box, it can manually handle and report Page View, Page Action, and Error events.
|
|
34
|
+
*
|
|
35
|
+
* @note This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to browser-agent@newrelic.com for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link https://www.npmjs.com/package/@newrelic/browser-agent#deploying-one-or-more-micro-agents-per-page} for more information in the documentation.
|
|
35
38
|
*/
|
|
36
39
|
export class MicroAgent extends MicroAgentBase {
|
|
37
40
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* --- A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
2
|
+
* A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
4
3
|
* automatically instrument. Instead, each MicroAgent instance will lazy load the required features and can support loading multiple instances on one page.
|
|
5
4
|
* Out of the box, it can manually handle and report Page View, Page Action, and Error events.
|
|
5
|
+
*
|
|
6
|
+
* @note This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to browser-agent@newrelic.com for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://www.npmjs.com/package/@newrelic/browser-agent#deploying-one-or-more-micro-agents-per-page} for more information in the documentation.
|
|
6
9
|
*/
|
|
7
10
|
export class MicroAgent extends MicroAgentBase {
|
|
8
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAmCA
|
|
1
|
+
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,SAAS,EAAE,YAAY,EAsExC;IAjEC,aAAkB;IAwBlB;;;;OAIG;IACH,uBAFW,MAAM,GAAC,MAAM,EAAE,aAmCzB;IAKH;;;;;MAOC;IAED,gBAEC;CACF;+BArH8B,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -34,10 +34,13 @@ const nonAutoFeatures = [
|
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* --- A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
37
|
+
* A minimal agent class designed to only respond to manual user input. As such, this class does not
|
|
39
38
|
* automatically instrument. Instead, each MicroAgent instance will lazy load the required features and can support loading multiple instances on one page.
|
|
40
39
|
* Out of the box, it can manually handle and report Page View, Page Action, and Error events.
|
|
40
|
+
*
|
|
41
|
+
* @note This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to browser-agent@newrelic.com for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
|
|
42
|
+
*
|
|
43
|
+
* @see {@link https://www.npmjs.com/package/@newrelic/browser-agent#deploying-one-or-more-micro-agents-per-page} for more information in the documentation.
|
|
41
44
|
*/
|
|
42
45
|
export class MicroAgent extends MicroAgentBase {
|
|
43
46
|
/**
|