o11y 260.5.0 → 260.9.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/dist/modules/o11y/client/client.js +25 -8
- package/dist/modules/o11y/client/client.js.map +1 -1
- package/dist/modules/o11y/client/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/client/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/client/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/client/version.d.ts +2 -2
- package/dist/modules/o11y/collectors/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/collectors/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/collectors/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/collectors/version.d.ts +2 -2
- package/dist/modules/o11y/core_envelope/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/core_envelope/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/core_envelope/version.d.ts +2 -2
- package/dist/modules/o11y/shared/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/shared/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/shared/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/shared/version.d.ts +2 -2
- package/dist/modules/o11y/simple_collector/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/simple_collector/version.d.ts +2 -2
- package/dist/modules/o11y/web_vitals/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/web_vitals/version.d.ts +2 -2
- package/dist/modules/o11y/web_vitals/web_vitals.js +10 -2723
- package/dist/modules/o11y/web_vitals/web_vitals.js.map +1 -1
- package/package.json +2 -2
|
@@ -1711,13 +1711,17 @@ class InstrumentationImpl {
|
|
|
1711
1711
|
noRerooting = true;
|
|
1712
1712
|
context = {
|
|
1713
1713
|
rootId,
|
|
1714
|
-
isRootActivitySampled: options.instrumentationContext.isRootActivitySampled
|
|
1714
|
+
isRootActivitySampled: options.instrumentationContext.isRootActivitySampled,
|
|
1715
|
+
isRootActivityExternalSampled: options.instrumentationContext.isRootActivityExternalSampled
|
|
1715
1716
|
};
|
|
1716
1717
|
}
|
|
1717
1718
|
else {
|
|
1718
1719
|
context = this._nextGen.getDefaultInstrumentationContext();
|
|
1719
1720
|
}
|
|
1720
|
-
const
|
|
1721
|
+
const isActivitySampled = (options === null || options === void 0 ? void 0 : options.isExternal)
|
|
1722
|
+
? context.isRootActivityExternalSampled
|
|
1723
|
+
: context.isRootActivitySampled;
|
|
1724
|
+
const activity = new ActivityImpl(name, context.rootId, this._onActivityStoppedCallback, this._onActivityErrorCallback, maxActivityDurationMsecs, options === null || options === void 0 ? void 0 : options.id, isActivitySampled, options === null || options === void 0 ? void 0 : options.perfStartOverride, noRerooting, options === null || options === void 0 ? void 0 : options.isExternal, parentActivity);
|
|
1721
1725
|
return activity;
|
|
1722
1726
|
}, activityNoOp, { op: 'startActivity' });
|
|
1723
1727
|
}
|
|
@@ -1970,9 +1974,17 @@ class RootActivityHistoryImpl {
|
|
|
1970
1974
|
}
|
|
1971
1975
|
|
|
1972
1976
|
class RootActivityImpl extends ActivityImpl {
|
|
1973
|
-
constructor(name, onStopped, onError, rootId, isSampled, startPerfTime, generatedRootIdLength) {
|
|
1977
|
+
constructor(name, onStopped, onError, rootId, isSampled, startPerfTime, generatedRootIdLength, isExternalSampled) {
|
|
1974
1978
|
super(name, undefined, onStopped, onError, undefined, rootId || utility.generateUniqueId(generatedRootIdLength !== null && generatedRootIdLength !== void 0 ? generatedRootIdLength : 32), isSampled, startPerfTime);
|
|
1975
1979
|
this._isRoot = true;
|
|
1980
|
+
this._isExternalSampled = isExternalSampled;
|
|
1981
|
+
}
|
|
1982
|
+
get isExternalSampled() {
|
|
1983
|
+
var _a;
|
|
1984
|
+
return (_a = this._isExternalSampled) !== null && _a !== void 0 ? _a : false;
|
|
1985
|
+
}
|
|
1986
|
+
set isExternalSampled(value) {
|
|
1987
|
+
this._isExternalSampled = value;
|
|
1976
1988
|
}
|
|
1977
1989
|
get preRootId() {
|
|
1978
1990
|
return this._preRootId;
|
|
@@ -2037,13 +2049,13 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
2037
2049
|
this._rootActivityHistory = new RootActivityHistoryImpl();
|
|
2038
2050
|
this._onRootActivityStoppedCallback = this._handleRootActivityStop.bind(this);
|
|
2039
2051
|
}
|
|
2040
|
-
startRootActivity(name, rootId, isSampled, options) {
|
|
2052
|
+
startRootActivity(name, rootId, isSampled, options, isExternalActivitySampled) {
|
|
2041
2053
|
return this._safety.tryCatchReturn(() => {
|
|
2042
2054
|
utility.requireArgument(name, 'name');
|
|
2043
2055
|
if ((options === null || options === void 0 ? void 0 : options.id) !== undefined) {
|
|
2044
2056
|
throw new Error('Cannot specify id for root activity, use rootId argument instead');
|
|
2045
2057
|
}
|
|
2046
|
-
const newRootActivity = new RootActivityImpl(name, this._onRootActivityStoppedCallback, this._onActivityErrorCallback, rootId, isSampled, options === null || options === void 0 ? void 0 : options.perfStartOverride, this._nextGen.preferredRootIdLength);
|
|
2058
|
+
const newRootActivity = new RootActivityImpl(name, this._onRootActivityStoppedCallback, this._onActivityErrorCallback, rootId, isSampled, options === null || options === void 0 ? void 0 : options.perfStartOverride, this._nextGen.preferredRootIdLength, isExternalActivitySampled);
|
|
2047
2059
|
if (!this._allowMulti) {
|
|
2048
2060
|
const entry = {
|
|
2049
2061
|
id: newRootActivity.getId(),
|
|
@@ -2089,6 +2101,10 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
2089
2101
|
var _a;
|
|
2090
2102
|
return (_a = this._singleRootActivity) === null || _a === void 0 ? void 0 : _a.getIsSampled();
|
|
2091
2103
|
}
|
|
2104
|
+
isSingleRootActivityExternalSampled() {
|
|
2105
|
+
var _a, _b;
|
|
2106
|
+
return (_b = (_a = this._singleRootActivity) === null || _a === void 0 ? void 0 : _a.isExternalSampled) !== null && _b !== void 0 ? _b : false;
|
|
2107
|
+
}
|
|
2092
2108
|
_initMetrics() {
|
|
2093
2109
|
return new MetricsImpl(this.name, () => this.name);
|
|
2094
2110
|
}
|
|
@@ -2564,10 +2580,11 @@ class NextgenImpl {
|
|
|
2564
2580
|
return this._autoClickTracker;
|
|
2565
2581
|
}
|
|
2566
2582
|
getDefaultInstrumentationContext() {
|
|
2567
|
-
var _a, _b;
|
|
2583
|
+
var _a, _b, _c;
|
|
2568
2584
|
return {
|
|
2569
2585
|
rootId: (_a = this._appInstr) === null || _a === void 0 ? void 0 : _a.getSingleRootActivityId(),
|
|
2570
|
-
isRootActivitySampled: (_b = this._appInstr) === null || _b === void 0 ? void 0 : _b.isSingleRootActivitySampled()
|
|
2586
|
+
isRootActivitySampled: (_b = this._appInstr) === null || _b === void 0 ? void 0 : _b.isSingleRootActivitySampled(),
|
|
2587
|
+
isRootActivityExternalSampled: (_c = this._appInstr) === null || _c === void 0 ? void 0 : _c.isSingleRootActivityExternalSampled()
|
|
2571
2588
|
};
|
|
2572
2589
|
}
|
|
2573
2590
|
activateClickTracker() {
|
|
@@ -2783,7 +2800,7 @@ class ConsoleCollector {
|
|
|
2783
2800
|
}
|
|
2784
2801
|
}
|
|
2785
2802
|
|
|
2786
|
-
const version = '260.
|
|
2803
|
+
const version = '260.9.0';
|
|
2787
2804
|
|
|
2788
2805
|
const idleDetector = new IdleDetectorImpl({
|
|
2789
2806
|
logThreshold: 300,
|