@newrelic/browser-agent 1.246.0 → 1.246.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 +7 -0
- package/README.md +19 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/features/utils/feature-base.js +2 -2
- package/dist/cjs/features/utils/instrument-base.js +3 -3
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/utils/feature-base.js +2 -2
- package/dist/esm/features/utils/instrument-base.js +3 -3
- package/dist/types/common/event-emitter/contextual-ee.d.ts +2 -2
- package/dist/types/common/event-emitter/register-handler.d.ts +1 -1
- package/dist/types/common/session/session-entity.d.ts +9 -9
- package/dist/types/common/vitals/constants.d.ts +8 -8
- package/dist/types/common/window/nreum.d.ts +2 -2
- 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/session_replay/aggregate/index.d.ts +6 -6
- package/dist/types/features/utils/feature-base.d.ts +4 -4
- package/dist/types/features/utils/feature-base.d.ts.map +1 -1
- package/dist/types/features/utils/instrument-base.d.ts +6 -6
- package/dist/types/features/utils/instrument-base.d.ts.map +1 -1
- package/dist/types/loaders/features/features.d.ts +9 -9
- package/dist/types/loaders/micro-agent.d.ts +2 -2
- package/dist/types/loaders/micro-agent.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/utils/feature-base.js +2 -2
- package/src/features/utils/instrument-base.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.246.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.246.0...v1.246.1) (2023-10-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix missing type declarations ([#791](https://github.com/newrelic/newrelic-browser-agent/issues/791)) ([c80e8d2](https://github.com/newrelic/newrelic-browser-agent/commit/c80e8d260a8919a41ebca7bdc182937819464dc7))
|
|
12
|
+
|
|
6
13
|
## [1.246.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.245.0...v1.246.0) (2023-10-23)
|
|
7
14
|
|
|
8
15
|
|
package/README.md
CHANGED
|
@@ -171,6 +171,25 @@ try{
|
|
|
171
171
|
microAgent2.addPageAction('myData', {hello: 'world'})
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
## Browser Agent APIs
|
|
175
|
+
All Browser Agent APIs are exposed for use in two ways:
|
|
176
|
+
- Via the `newrelic` window-level global object
|
|
177
|
+
- At the top-level of the Agent instance
|
|
178
|
+
|
|
179
|
+
Please see our [official documentation](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/using-browser-apis/) for more information about the Browser Agent APIs.
|
|
180
|
+
|
|
181
|
+
```js
|
|
182
|
+
newrelic.noticeError(...)
|
|
183
|
+
// or
|
|
184
|
+
const NrAgent = new BrowserAgent(...)
|
|
185
|
+
NrAgent.noticeError(...)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Session Replay
|
|
189
|
+
The Session Replay feature is currently in Limited Preview and only functional for customers participating in the early access program. To request access, please visit [this link](https://newrelic.com/platform/session-replay-early-access).
|
|
190
|
+
|
|
191
|
+
Due to the sensitive nature of the feature, Session Replay has many configuration options, which are configurable in each browser application's *Application Settings* page on the New Relic site. These settings will only be accessible if you are participating in the limited preview. Additionally, you can control the sampling rates, obfuscation conditions and triggering rules of Session Replay.
|
|
192
|
+
|
|
174
193
|
## Supported browsers
|
|
175
194
|
|
|
176
195
|
Our supported browser list can be accessed [here](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/compatibility-requirements-browser-monitoring/#browser-types).
|
|
@@ -9,9 +9,9 @@ class FeatureBase {
|
|
|
9
9
|
constructor(agentIdentifier, aggregator, featureName) {
|
|
10
10
|
/** @type {string} */
|
|
11
11
|
this.agentIdentifier = agentIdentifier;
|
|
12
|
-
/** @type {Aggregator} */
|
|
12
|
+
/** @type {import('../../common/aggregate/aggregator').Aggregator} */
|
|
13
13
|
this.aggregator = aggregator;
|
|
14
|
-
/** @type {
|
|
14
|
+
/** @type {import('../../common/event-emitter/contextual-ee').ee} */
|
|
15
15
|
this.ee = _contextualEe.ee.get(agentIdentifier);
|
|
16
16
|
/** @type {string} */
|
|
17
17
|
this.featureName = featureName;
|
|
@@ -25,7 +25,7 @@ class InstrumentBase extends _featureBase.FeatureBase {
|
|
|
25
25
|
/**
|
|
26
26
|
* Instantiate InstrumentBase.
|
|
27
27
|
* @param {string} agentIdentifier - The unique ID of the instantiated agent (relative to global scope).
|
|
28
|
-
* @param {Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
28
|
+
* @param {import('../../common/aggregate/aggregator').Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
29
29
|
* @param {string} featureName - The name of the feature module (used to construct file path).
|
|
30
30
|
* @param {boolean} [auto=true] - Determines whether the feature should automatically register to have the draining
|
|
31
31
|
* of its pooled instrumentation data handled by the agent's centralized drain functionality, rather than draining
|
|
@@ -40,7 +40,7 @@ class InstrumentBase extends _featureBase.FeatureBase {
|
|
|
40
40
|
this.abortHandler = undefined;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @type {
|
|
43
|
+
* @type {import('./aggregate-base').AggregateBase} Holds the reference to the feature's aggregate module counterpart, if and after it has been initialized. This may not be assigned until after page loads!
|
|
44
44
|
* The only purpose of this for now is to expose it to the NREUM interface, as the feature's instrument instance is already exposed.
|
|
45
45
|
*/
|
|
46
46
|
this.featAggregate = undefined;
|
|
@@ -132,7 +132,7 @@ class InstrumentBase extends _featureBase.FeatureBase {
|
|
|
132
132
|
/**
|
|
133
133
|
* Make a determination if an aggregate class should even be imported
|
|
134
134
|
* @param {string} featureName
|
|
135
|
-
* @param {SessionEntity} session
|
|
135
|
+
* @param {import('../../common/session/session-entity').SessionEntity} session
|
|
136
136
|
* @returns
|
|
137
137
|
*/
|
|
138
138
|
shouldImportAgg(featureName, session) {
|
|
@@ -3,9 +3,9 @@ export class FeatureBase {
|
|
|
3
3
|
constructor(agentIdentifier, aggregator, featureName) {
|
|
4
4
|
/** @type {string} */
|
|
5
5
|
this.agentIdentifier = agentIdentifier;
|
|
6
|
-
/** @type {Aggregator} */
|
|
6
|
+
/** @type {import('../../common/aggregate/aggregator').Aggregator} */
|
|
7
7
|
this.aggregator = aggregator;
|
|
8
|
-
/** @type {
|
|
8
|
+
/** @type {import('../../common/event-emitter/contextual-ee').ee} */
|
|
9
9
|
this.ee = ee.get(agentIdentifier);
|
|
10
10
|
/** @type {string} */
|
|
11
11
|
this.featureName = featureName;
|
|
@@ -20,7 +20,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
20
20
|
/**
|
|
21
21
|
* Instantiate InstrumentBase.
|
|
22
22
|
* @param {string} agentIdentifier - The unique ID of the instantiated agent (relative to global scope).
|
|
23
|
-
* @param {Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
23
|
+
* @param {import('../../common/aggregate/aggregator').Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
24
24
|
* @param {string} featureName - The name of the feature module (used to construct file path).
|
|
25
25
|
* @param {boolean} [auto=true] - Determines whether the feature should automatically register to have the draining
|
|
26
26
|
* of its pooled instrumentation data handled by the agent's centralized drain functionality, rather than draining
|
|
@@ -35,7 +35,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
35
35
|
this.abortHandler = undefined;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {import('./aggregate-base').AggregateBase} Holds the reference to the feature's aggregate module counterpart, if and after it has been initialized. This may not be assigned until after page loads!
|
|
39
39
|
* The only purpose of this for now is to expose it to the NREUM interface, as the feature's instrument instance is already exposed.
|
|
40
40
|
*/
|
|
41
41
|
this.featAggregate = undefined;
|
|
@@ -127,7 +127,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
127
127
|
/**
|
|
128
128
|
* Make a determination if an aggregate class should even be imported
|
|
129
129
|
* @param {string} featureName
|
|
130
|
-
* @param {SessionEntity} session
|
|
130
|
+
* @param {import('../../common/session/session-entity').SessionEntity} session
|
|
131
131
|
* @returns
|
|
132
132
|
*/
|
|
133
133
|
shouldImportAgg(featureName, session) {
|
|
@@ -8,10 +8,10 @@ declare namespace globalInstance {
|
|
|
8
8
|
export { context };
|
|
9
9
|
export { bufferEventsByGroup as buffer };
|
|
10
10
|
export { abort };
|
|
11
|
-
export
|
|
11
|
+
export let aborted: boolean;
|
|
12
12
|
export { isBuffering };
|
|
13
13
|
export { debugId };
|
|
14
|
-
export
|
|
14
|
+
export let backlog: any;
|
|
15
15
|
}
|
|
16
16
|
export const contextId: string;
|
|
17
17
|
declare function emit(type: any, args: any, contextOrStore: any, force: any, bubble: any): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function defaultRegister(type: any, handler: any, group: any, ee: any): void;
|
|
2
2
|
export namespace defaultRegister {
|
|
3
3
|
export { registerWithSpecificEmitter as on };
|
|
4
|
-
export
|
|
4
|
+
export let handlers: {};
|
|
5
5
|
}
|
|
6
6
|
export { defaultRegister as registerHandler };
|
|
7
7
|
declare function registerWithSpecificEmitter(ee: any, handlers: any, type: any, handler: any, group: any): void;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export namespace MODE {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
let OFF: number;
|
|
3
|
+
let FULL: number;
|
|
4
|
+
let ERROR: number;
|
|
5
5
|
}
|
|
6
6
|
export namespace SESSION_EVENTS {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
let PAUSE: string;
|
|
8
|
+
let RESET: string;
|
|
9
|
+
let RESUME: string;
|
|
10
|
+
let UPDATE: string;
|
|
11
11
|
}
|
|
12
12
|
export namespace SESSION_EVENT_TYPES {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
let SAME_TAB: string;
|
|
14
|
+
let CROSS_TAB: string;
|
|
15
15
|
}
|
|
16
16
|
export class SessionEntity {
|
|
17
17
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export namespace VITAL_NAMES {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
let FIRST_PAINT: string;
|
|
3
|
+
let FIRST_CONTENTFUL_PAINT: string;
|
|
4
|
+
let FIRST_INPUT_DELAY: string;
|
|
5
|
+
let LARGEST_CONTENTFUL_PAINT: string;
|
|
6
|
+
let CUMULATIVE_LAYOUT_SHIFT: string;
|
|
7
|
+
let INTERACTION_TO_NEXT_PAINT: string;
|
|
8
|
+
let LONG_TASK: string;
|
|
9
|
+
let TIME_TO_FIRST_BYTE: string;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -8,7 +8,7 @@ export function addToNREUM(fnName: any, fn: any): void;
|
|
|
8
8
|
export function NREUMinitialized(): void;
|
|
9
9
|
export function gosCDN(): any;
|
|
10
10
|
export namespace defaults {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
let beacon: string;
|
|
12
|
+
let errorBeacon: string;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=nreum.d.ts.map
|
|
@@ -8,10 +8,10 @@ export class Aggregate extends AggregateBase {
|
|
|
8
8
|
observedAt: {};
|
|
9
9
|
pageviewReported: {};
|
|
10
10
|
errorCache: {};
|
|
11
|
-
currentBody:
|
|
11
|
+
currentBody: {} | null | undefined;
|
|
12
12
|
errorOnPage: boolean;
|
|
13
13
|
onHarvestStarted(options: any): {
|
|
14
|
-
body:
|
|
14
|
+
body: {} | null;
|
|
15
15
|
qs: {};
|
|
16
16
|
};
|
|
17
17
|
onHarvestFinished(result: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAuBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,mDAoCC;IAjCC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,eAAoB;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/jserrors/aggregate/index.js"],"names":[],"mappings":"AAuBA;;GAEG;AAEH;IACE,2BAAiC;IACjC,mDAoCC;IAjCC,kBAAuB;IACvB,eAAoB;IACpB,qBAA0B;IAC1B,eAAoB;IACpB,mCAA4B;IAC5B,qBAAwB;IA8B1B;;;MAoBC;IAED,qCAWC;IAED,8BAEC;IAED,oEAMC;IAED;;;;;;OAMG;IACH,qCAHW,SAAS,GACP,MAAM,CAgBlB;IAED,4EA4FC;IAED,2CAgCC;IAED,+CA2BC;CACF;wBA7QY,OAAO,0BAA0B,EAAE,SAAS;8BAH3B,4BAA4B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export const AVG_COMPRESSION: 0.12;
|
|
2
2
|
export namespace RRWEB_EVENT_TYPES {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
let DomContentLoaded: number;
|
|
4
|
+
let Load: number;
|
|
5
|
+
let FullSnapshot: number;
|
|
6
|
+
let IncrementalSnapshot: number;
|
|
7
|
+
let Meta: number;
|
|
8
|
+
let Custom: number;
|
|
9
9
|
}
|
|
10
10
|
/** Vortex caps payload sizes at 1MB */
|
|
11
11
|
export const MAX_PAYLOAD_SIZE: 1000000;
|
|
@@ -2,10 +2,10 @@ export class FeatureBase {
|
|
|
2
2
|
constructor(agentIdentifier: any, aggregator: any, featureName: any);
|
|
3
3
|
/** @type {string} */
|
|
4
4
|
agentIdentifier: string;
|
|
5
|
-
/** @type {Aggregator} */
|
|
6
|
-
aggregator: Aggregator;
|
|
7
|
-
/** @type {
|
|
8
|
-
ee:
|
|
5
|
+
/** @type {import('../../common/aggregate/aggregator').Aggregator} */
|
|
6
|
+
aggregator: import('../../common/aggregate/aggregator').Aggregator;
|
|
7
|
+
/** @type {import('../../common/event-emitter/contextual-ee').ee} */
|
|
8
|
+
ee: any;
|
|
9
9
|
/** @type {string} */
|
|
10
10
|
featureName: string;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"AAEA;IACE,qEAeC;IAdC,qBAAqB;IACrB,iBADW,MAAM,CACqB;IACtC,
|
|
1
|
+
{"version":3,"file":"feature-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/feature-base.js"],"names":[],"mappings":"AAEA;IACE,qEAeC;IAdC,qBAAqB;IACrB,iBADW,MAAM,CACqB;IACtC,qEAAqE;IACrE,YADW,OAAO,mCAAmC,EAAE,UAAU,CACrC;IAC5B,oEAAoE;IACpE,QAAiC;IACjC,qBAAqB;IACrB,aADW,MAAM,CACa;IAC9B;;;;OAIG;IACH,SAFU,OAAO,CAEG;CAEvB"}
|
|
@@ -6,21 +6,21 @@ export class InstrumentBase extends FeatureBase {
|
|
|
6
6
|
/**
|
|
7
7
|
* Instantiate InstrumentBase.
|
|
8
8
|
* @param {string} agentIdentifier - The unique ID of the instantiated agent (relative to global scope).
|
|
9
|
-
* @param {Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
9
|
+
* @param {import('../../common/aggregate/aggregator').Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
10
10
|
* @param {string} featureName - The name of the feature module (used to construct file path).
|
|
11
11
|
* @param {boolean} [auto=true] - Determines whether the feature should automatically register to have the draining
|
|
12
12
|
* of its pooled instrumentation data handled by the agent's centralized drain functionality, rather than draining
|
|
13
13
|
* immediately. Primarily useful for fine-grained control in tests.
|
|
14
14
|
*/
|
|
15
|
-
constructor(agentIdentifier: string, aggregator: Aggregator, featureName: string, auto?: boolean | undefined);
|
|
15
|
+
constructor(agentIdentifier: string, aggregator: import('../../common/aggregate/aggregator').Aggregator, featureName: string, auto?: boolean | undefined);
|
|
16
16
|
auto: boolean;
|
|
17
17
|
/** @type {Function | undefined} This should be set by any derived Instrument class if it has things to do when feature fails or is killed. */
|
|
18
18
|
abortHandler: Function | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* @type {
|
|
20
|
+
* @type {import('./aggregate-base').AggregateBase} Holds the reference to the feature's aggregate module counterpart, if and after it has been initialized. This may not be assigned until after page loads!
|
|
21
21
|
* The only purpose of this for now is to expose it to the NREUM interface, as the feature's instrument instance is already exposed.
|
|
22
22
|
*/
|
|
23
|
-
featAggregate:
|
|
23
|
+
featAggregate: import('./aggregate-base').AggregateBase;
|
|
24
24
|
/**
|
|
25
25
|
* @type {Promise} Assigned immediately after @see importAggregator runs. Serves as a signal for when the inner async fn finishes execution. Useful for features to await
|
|
26
26
|
* one another if there are inter-features dependencies.
|
|
@@ -36,10 +36,10 @@ export class InstrumentBase extends FeatureBase {
|
|
|
36
36
|
/**
|
|
37
37
|
* Make a determination if an aggregate class should even be imported
|
|
38
38
|
* @param {string} featureName
|
|
39
|
-
* @param {SessionEntity} session
|
|
39
|
+
* @param {import('../../common/session/session-entity').SessionEntity} session
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
shouldImportAgg(featureName: string, session: SessionEntity): boolean;
|
|
42
|
+
shouldImportAgg(featureName: string, session: import('../../common/session/session-entity').SessionEntity): boolean;
|
|
43
43
|
}
|
|
44
44
|
import { FeatureBase } from './feature-base';
|
|
45
45
|
//# sourceMappingURL=instrument-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/instrument-base.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH;IACE;;;;;;;;OAQG;IACH,6BAPW,MAAM,
|
|
1
|
+
{"version":3,"file":"instrument-base.d.ts","sourceRoot":"","sources":["../../../../src/features/utils/instrument-base.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH;IACE;;;;;;;;OAQG;IACH,6BAPW,MAAM,cACN,OAAO,mCAAmC,EAAE,UAAU,eACtD,MAAM,8BA4BhB;IArBC,cAAgB;IAEhB,8IAA8I;IAC9I,cADW,WAAW,SAAS,CACF;IAE7B;;;MAGE;IACF,eAHU,OAAO,kBAAkB,EAAE,aAAa,CAGpB;IAE9B;;;MAGE;IACF,kCAAoC;IAQtC;;;;;OAKG;IACH,mEA4DC;IAED;;;;;KAKC;IACD,6BAJS,MAAM,WACN,OAAO,qCAAqC,EAAE,aAAa,WAUnE;CACF;4BAhI2B,gBAAgB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export namespace FEATURE_NAMES {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
let ajax: string;
|
|
3
|
+
let jserrors: string;
|
|
4
|
+
let metrics: string;
|
|
5
|
+
let pageAction: string;
|
|
6
|
+
let pageViewEvent: string;
|
|
7
|
+
let pageViewTiming: string;
|
|
8
|
+
let sessionReplay: string;
|
|
9
|
+
let sessionTrace: string;
|
|
10
|
+
let spa: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The order in which features will be instrumented. This is the traditional order. It's unclear if the order of
|
|
@@ -17,14 +17,14 @@ export class MicroAgent extends AgentBase {
|
|
|
17
17
|
* {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-apis/start/}
|
|
18
18
|
* @param {string|string[]|undefined} name The feature name(s) to start. If no name(s) are passed, all features will be started
|
|
19
19
|
*/
|
|
20
|
-
start: (features: any) => false | void |
|
|
20
|
+
start: (features: any) => false | void | this;
|
|
21
21
|
get config(): {
|
|
22
22
|
info: any;
|
|
23
23
|
init: any;
|
|
24
24
|
loader_config: any;
|
|
25
25
|
runtime: any;
|
|
26
26
|
};
|
|
27
|
-
run(features: any): false | void |
|
|
27
|
+
run(features: any): false | void | this;
|
|
28
28
|
}
|
|
29
29
|
import { AgentBase } from './agent-base';
|
|
30
30
|
import { Aggregator } from '../common/aggregate/aggregator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACE;;;OAGG;IACH,qBAHW,MAAM,oBACN,MAAM,cAkBhB;IAbC,wBAAsC;IACtC,6BAAiF;IACjF,aAAkB;IAIlB;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"micro-agent.d.ts","sourceRoot":"","sources":["../../../src/loaders/micro-agent.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACE;;;OAGG;IACH,qBAHW,MAAM,oBACN,MAAM,cAkBhB;IAbC,wBAAsC;IACtC,6BAAiF;IACjF,aAAkB;IAIlB;;;;OAIG;IACH,8CAA2C;IAI7C;;;;;MAOC;IAED,wCA0CC;CACF;0BAxFyB,cAAc;2BAPb,gCAAgC"}
|
package/package.json
CHANGED
|
@@ -4,9 +4,9 @@ export class FeatureBase {
|
|
|
4
4
|
constructor (agentIdentifier, aggregator, featureName) {
|
|
5
5
|
/** @type {string} */
|
|
6
6
|
this.agentIdentifier = agentIdentifier
|
|
7
|
-
/** @type {Aggregator} */
|
|
7
|
+
/** @type {import('../../common/aggregate/aggregator').Aggregator} */
|
|
8
8
|
this.aggregator = aggregator
|
|
9
|
-
/** @type {
|
|
9
|
+
/** @type {import('../../common/event-emitter/contextual-ee').ee} */
|
|
10
10
|
this.ee = ee.get(agentIdentifier)
|
|
11
11
|
/** @type {string} */
|
|
12
12
|
this.featureName = featureName
|
|
@@ -20,7 +20,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
20
20
|
/**
|
|
21
21
|
* Instantiate InstrumentBase.
|
|
22
22
|
* @param {string} agentIdentifier - The unique ID of the instantiated agent (relative to global scope).
|
|
23
|
-
* @param {Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
23
|
+
* @param {import('../../common/aggregate/aggregator').Aggregator} aggregator - The shared Aggregator that will handle batching and reporting of data.
|
|
24
24
|
* @param {string} featureName - The name of the feature module (used to construct file path).
|
|
25
25
|
* @param {boolean} [auto=true] - Determines whether the feature should automatically register to have the draining
|
|
26
26
|
* of its pooled instrumentation data handled by the agent's centralized drain functionality, rather than draining
|
|
@@ -34,7 +34,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
34
34
|
this.abortHandler = undefined
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {import('./aggregate-base').AggregateBase} Holds the reference to the feature's aggregate module counterpart, if and after it has been initialized. This may not be assigned until after page loads!
|
|
38
38
|
* The only purpose of this for now is to expose it to the NREUM interface, as the feature's instrument instance is already exposed.
|
|
39
39
|
*/
|
|
40
40
|
this.featAggregate = undefined
|
|
@@ -122,7 +122,7 @@ export class InstrumentBase extends FeatureBase {
|
|
|
122
122
|
/**
|
|
123
123
|
* Make a determination if an aggregate class should even be imported
|
|
124
124
|
* @param {string} featureName
|
|
125
|
-
* @param {SessionEntity} session
|
|
125
|
+
* @param {import('../../common/session/session-entity').SessionEntity} session
|
|
126
126
|
* @returns
|
|
127
127
|
*/
|
|
128
128
|
shouldImportAgg (featureName, session) {
|