o11y 250.5.0 → 250.6.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 +110 -15
- package/dist/modules/o11y/client/client.js.map +1 -1
- package/dist/modules/o11y/client/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/client/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/client/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/client/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/client/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/client/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/client/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/client/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/client/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/client/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/client/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/client/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/client/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/client/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/client/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/client/version.d.ts +1 -1
- package/dist/modules/o11y/collectors/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/collectors/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/collectors/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/collectors/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/collectors/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/collectors/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/collectors/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/collectors/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/collectors/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/collectors/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/collectors/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/collectors/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/collectors/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/collectors/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/collectors/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/collectors/version.d.ts +1 -1
- package/dist/modules/o11y/core_envelope/core_envelope.js +1 -1
- package/dist/modules/o11y/core_envelope/core_envelope.js.map +1 -1
- package/dist/modules/o11y/core_envelope/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/core_envelope/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/core_envelope/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/core_envelope/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/core_envelope/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/core_envelope/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/core_envelope/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/core_envelope/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/core_envelope/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/core_envelope/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/core_envelope/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/core_envelope/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/core_envelope/version.d.ts +1 -1
- package/dist/modules/o11y/shared/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/shared/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/shared/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/shared/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/shared/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/shared/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/shared/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/shared/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/shared/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/shared/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/shared/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/shared/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/shared/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/shared/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/shared/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/shared/version.d.ts +1 -1
- package/dist/modules/o11y/simple_collector/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/simple_collector/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/simple_collector/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/simple_collector/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/simple_collector/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/simple_collector/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/simple_collector/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/simple_collector/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/simple_collector/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/simple_collector/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/simple_collector/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/simple_collector/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/simple_collector/version.d.ts +1 -1
- package/dist/modules/o11y/web_vitals/interfaces/ActivityApiOptions.d.ts +4 -0
- package/dist/modules/o11y/web_vitals/interfaces/ActivityDetail.d.ts +2 -0
- package/dist/modules/o11y/web_vitals/interfaces/ActivityStartApiOptions.d.ts +4 -0
- package/dist/modules/o11y/web_vitals/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/web_vitals/interfaces/Instrumentation.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/interfaces/InstrumentedAppMethods.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/interfaces/index.d.ts +2 -0
- package/dist/modules/o11y/web_vitals/interfaces-private/ActivityData.d.ts +2 -0
- package/dist/modules/o11y/web_vitals/library/ActivityImpl.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/library/AppInstrumentationImpl.d.ts +5 -2
- package/dist/modules/o11y/web_vitals/library/InstrumentationImpl.d.ts +3 -1
- package/dist/modules/o11y/web_vitals/library/NextgenImpl.d.ts +2 -0
- package/dist/modules/o11y/web_vitals/library/RootActivityHistoryImpl.d.ts +12 -0
- package/dist/modules/o11y/web_vitals/library/RootActivityImpl.d.ts +1 -1
- package/dist/modules/o11y/web_vitals/types/RootActivityHistoryEntry.d.ts +7 -0
- package/dist/modules/o11y/web_vitals/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -896,12 +896,13 @@ const stopReason = {
|
|
|
896
896
|
discarded
|
|
897
897
|
};
|
|
898
898
|
class ActivityImpl {
|
|
899
|
-
constructor(_name, _rootId, _onStopped, _onError, timeout, id, _isSampled) {
|
|
899
|
+
constructor(_name, _rootId, _onStopped, _onError, timeout, id, _isSampled, _startPerfTime, _noRerooting) {
|
|
900
900
|
this._name = _name;
|
|
901
901
|
this._rootId = _rootId;
|
|
902
902
|
this._onStopped = _onStopped;
|
|
903
903
|
this._onError = _onError;
|
|
904
904
|
this._isSampled = _isSampled;
|
|
905
|
+
this._noRerooting = _noRerooting;
|
|
905
906
|
this._errorCount = 0;
|
|
906
907
|
this._timerOverridden = TimerOverride.none;
|
|
907
908
|
const { tsNow, perfNow } = utility.time();
|
|
@@ -923,6 +924,7 @@ class ActivityImpl {
|
|
|
923
924
|
}
|
|
924
925
|
this._startTimestamp = tsNow;
|
|
925
926
|
this._startPerfTime = perfNow;
|
|
927
|
+
this._overrideTimer(_startPerfTime);
|
|
926
928
|
if (timeout > 0) {
|
|
927
929
|
this._timer = setTimeout(() => {
|
|
928
930
|
this._stopReason = this._stopReason || stopReason.timedout;
|
|
@@ -969,8 +971,9 @@ class ActivityImpl {
|
|
|
969
971
|
}
|
|
970
972
|
if (isStopTimeDefined &&
|
|
971
973
|
(perfStop < 0 ||
|
|
972
|
-
perfStop < (isStartTimeDefined ? perfStart : this._startPerfTime)
|
|
973
|
-
|
|
974
|
+
perfStop < (isStartTimeDefined ? perfStart : this._startPerfTime) ||
|
|
975
|
+
perfStop > utility.time().perfNow + 100)) {
|
|
976
|
+
throw new Error('perfStopOverride, if defined, must be >= 0 and >= startTime and <= now');
|
|
974
977
|
}
|
|
975
978
|
}
|
|
976
979
|
this._stopInternal(userSchemaOrText, userData, options);
|
|
@@ -1057,7 +1060,8 @@ class ActivityImpl {
|
|
|
1057
1060
|
stopPerfTime: this._stopPerfTime,
|
|
1058
1061
|
errorCount: this._errorCount,
|
|
1059
1062
|
isSampled: this.getIsSampled(),
|
|
1060
|
-
timerOverridden: this._timerOverridden
|
|
1063
|
+
timerOverridden: this._timerOverridden,
|
|
1064
|
+
noRerooting: this._noRerooting
|
|
1061
1065
|
};
|
|
1062
1066
|
}
|
|
1063
1067
|
getTraceHeaders(options) {
|
|
@@ -1588,8 +1592,10 @@ class InstrumentationImpl {
|
|
|
1588
1592
|
utility.requireArgument(name, 'name');
|
|
1589
1593
|
utility.requireArgumentIfDefined(options, 'options', 'object');
|
|
1590
1594
|
let context;
|
|
1595
|
+
let noRerooting = (options === null || options === void 0 ? void 0 : options.perfStartOverride) !== undefined;
|
|
1591
1596
|
const rootId = (_a = options === null || options === void 0 ? void 0 : options.instrumentationContext) === null || _a === void 0 ? void 0 : _a.rootId;
|
|
1592
1597
|
if (rootId) {
|
|
1598
|
+
noRerooting = true;
|
|
1593
1599
|
context = {
|
|
1594
1600
|
rootId,
|
|
1595
1601
|
isRootActivitySampled: options.instrumentationContext.isRootActivitySampled
|
|
@@ -1598,7 +1604,7 @@ class InstrumentationImpl {
|
|
|
1598
1604
|
else {
|
|
1599
1605
|
context = this._nextGen.getDefaultInstrumentationContext();
|
|
1600
1606
|
}
|
|
1601
|
-
const activity = new ActivityImpl(name, context.rootId, this._onActivityStoppedCallback, this._onActivityErrorCallback, maxActivityDurationMsecs, undefined, context.isRootActivitySampled);
|
|
1607
|
+
const activity = new ActivityImpl(name, context.rootId, this._onActivityStoppedCallback, this._onActivityErrorCallback, maxActivityDurationMsecs, undefined, context.isRootActivitySampled, options === null || options === void 0 ? void 0 : options.perfStartOverride, noRerooting);
|
|
1602
1608
|
return activity;
|
|
1603
1609
|
}, activityNoOp);
|
|
1604
1610
|
}
|
|
@@ -1612,13 +1618,22 @@ class InstrumentationImpl {
|
|
|
1612
1618
|
userPayload,
|
|
1613
1619
|
errorCount: detail.errorCount,
|
|
1614
1620
|
isSampled: detail.isSampled,
|
|
1615
|
-
timerOverridden: detail.timerOverridden
|
|
1621
|
+
timerOverridden: detail.timerOverridden,
|
|
1622
|
+
isRerooted: detail.isRerooted
|
|
1616
1623
|
};
|
|
1617
1624
|
}
|
|
1618
1625
|
_handleActivityStop(detail) {
|
|
1619
1626
|
if (detail.stopReason === discarded) {
|
|
1620
1627
|
return;
|
|
1621
1628
|
}
|
|
1629
|
+
if (!detail.isRoot && !detail.noRerooting) {
|
|
1630
|
+
const rahe = this._nextGen.getRootActivityHistoryEntryByTime(detail.startPerfTime);
|
|
1631
|
+
if ((!rahe && detail.rootId !== undefined) || (rahe && detail.rootId !== rahe.id)) {
|
|
1632
|
+
detail.rootId = rahe === null || rahe === void 0 ? void 0 : rahe.id;
|
|
1633
|
+
detail.isSampled = (rahe === null || rahe === void 0 ? void 0 : rahe.isSampled) || false;
|
|
1634
|
+
detail.isRerooted = true;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1622
1637
|
const activityData = this._getActivityData(detail);
|
|
1623
1638
|
this._logActivity(activityData, detail.startTimestamp, detail.rootId);
|
|
1624
1639
|
}
|
|
@@ -1742,9 +1757,17 @@ class InstrumentationImpl {
|
|
|
1742
1757
|
utility.requireArgument(listener, 'listener', 'function');
|
|
1743
1758
|
this._nextGen.registerForLogPrompt(listener);
|
|
1744
1759
|
}
|
|
1760
|
+
_getAsaOptions(options) {
|
|
1761
|
+
return options
|
|
1762
|
+
? Object.assign({
|
|
1763
|
+
instrumentationContext: options === null || options === void 0 ? void 0 : options.instrumentationContext
|
|
1764
|
+
}, options.startOptions)
|
|
1765
|
+
: undefined;
|
|
1766
|
+
}
|
|
1745
1767
|
activity(name, execute, options) {
|
|
1746
1768
|
var _a, _b, _c, _d;
|
|
1747
|
-
const
|
|
1769
|
+
const asaOptions = this._getAsaOptions(options);
|
|
1770
|
+
const act = this.startActivity(name, asaOptions);
|
|
1748
1771
|
try {
|
|
1749
1772
|
return execute(act);
|
|
1750
1773
|
}
|
|
@@ -1753,12 +1776,13 @@ class InstrumentationImpl {
|
|
|
1753
1776
|
throw err;
|
|
1754
1777
|
}
|
|
1755
1778
|
finally {
|
|
1756
|
-
act.stop((_c = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _c === void 0 ? void 0 : _c.schema, (_d = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _d === void 0 ? void 0 : _d.payload);
|
|
1779
|
+
act.stop((_c = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _c === void 0 ? void 0 : _c.schema, (_d = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _d === void 0 ? void 0 : _d.payload, options === null || options === void 0 ? void 0 : options.stopOptions);
|
|
1757
1780
|
}
|
|
1758
1781
|
}
|
|
1759
1782
|
async activityAsync(name, execute, options) {
|
|
1760
1783
|
var _a, _b, _c, _d;
|
|
1761
|
-
const
|
|
1784
|
+
const asaOptions = this._getAsaOptions(options);
|
|
1785
|
+
const act = this.startActivity(name, asaOptions);
|
|
1762
1786
|
try {
|
|
1763
1787
|
return await execute(act);
|
|
1764
1788
|
}
|
|
@@ -1767,15 +1791,66 @@ class InstrumentationImpl {
|
|
|
1767
1791
|
throw err;
|
|
1768
1792
|
}
|
|
1769
1793
|
finally {
|
|
1770
|
-
act.stop((_c = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _c === void 0 ? void 0 : _c.schema, (_d = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _d === void 0 ? void 0 : _d.payload);
|
|
1794
|
+
act.stop((_c = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _c === void 0 ? void 0 : _c.schema, (_d = options === null || options === void 0 ? void 0 : options.stopPayload) === null || _d === void 0 ? void 0 : _d.payload, options === null || options === void 0 ? void 0 : options.stopOptions);
|
|
1771
1795
|
}
|
|
1772
1796
|
}
|
|
1773
1797
|
}
|
|
1774
1798
|
InstrumentationImpl.defaultAppName = 'APP_NOT_REGISTERED';
|
|
1775
1799
|
|
|
1800
|
+
const GRACE = 0.1;
|
|
1801
|
+
const DEFAULT_LIMIT = 20;
|
|
1802
|
+
class RootActivityHistoryImpl {
|
|
1803
|
+
constructor(limit) {
|
|
1804
|
+
this._historyMap = new Map();
|
|
1805
|
+
this._historyList = new Array();
|
|
1806
|
+
if (utility.requireArgumentIfDefined(limit, 'limit', 'number')) {
|
|
1807
|
+
limit = Math.ceil(limit);
|
|
1808
|
+
if (limit <= 0) {
|
|
1809
|
+
throw new Error('Limit must be a positive number');
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
else {
|
|
1813
|
+
limit = DEFAULT_LIMIT;
|
|
1814
|
+
}
|
|
1815
|
+
this._graceCount = Math.max(1, Math.floor(limit * GRACE));
|
|
1816
|
+
this._realLimit = 1 + limit + this._graceCount;
|
|
1817
|
+
}
|
|
1818
|
+
add(entry) {
|
|
1819
|
+
if (this._historyMap.has(entry.id)) {
|
|
1820
|
+
throw new Error(`RootActivityHistoryImpl.add: entry already exists for rootId: ${entry.id}`);
|
|
1821
|
+
}
|
|
1822
|
+
this._historyMap.set(entry.id, entry);
|
|
1823
|
+
this._historyList.push(entry);
|
|
1824
|
+
if (this._historyList.length === this._realLimit) {
|
|
1825
|
+
const removed = this._historyList.splice(1, this._graceCount);
|
|
1826
|
+
removed.forEach((e) => this._historyMap.delete(e.id));
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
get count() {
|
|
1830
|
+
return this._historyList.length;
|
|
1831
|
+
}
|
|
1832
|
+
findById(rootId) {
|
|
1833
|
+
return this._historyMap.get(rootId);
|
|
1834
|
+
}
|
|
1835
|
+
findByTime(atTime) {
|
|
1836
|
+
let closest;
|
|
1837
|
+
let closestDiff = Number.MAX_VALUE;
|
|
1838
|
+
for (const entry of this._historyList) {
|
|
1839
|
+
const startDelta = atTime - entry.startPerfTime;
|
|
1840
|
+
const isDuringRoot = startDelta >= 0 &&
|
|
1841
|
+
(entry.stopPerfTime === undefined || atTime < entry.stopPerfTime);
|
|
1842
|
+
if (isDuringRoot && startDelta < closestDiff) {
|
|
1843
|
+
closest = entry;
|
|
1844
|
+
closestDiff = startDelta;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
return closest;
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1776
1851
|
class RootActivityImpl extends ActivityImpl {
|
|
1777
|
-
constructor(name, onStopped, onError, rootId,
|
|
1778
|
-
super(name, undefined, onStopped, onError, undefined, rootId || utility.generateUniqueId(32),
|
|
1852
|
+
constructor(name, onStopped, onError, rootId, isSampled, startPerfTime) {
|
|
1853
|
+
super(name, undefined, onStopped, onError, undefined, rootId || utility.generateUniqueId(32), isSampled, startPerfTime);
|
|
1779
1854
|
}
|
|
1780
1855
|
get preRootId() {
|
|
1781
1856
|
return this._preRootId;
|
|
@@ -1828,13 +1903,21 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
1828
1903
|
constructor(_nextGen, _name, _allowMulti) {
|
|
1829
1904
|
super(_nextGen, _name);
|
|
1830
1905
|
this._allowMulti = _allowMulti;
|
|
1906
|
+
this._rootActivityHistory = new RootActivityHistoryImpl();
|
|
1831
1907
|
this._onRootActivityStoppedCallback = this._handleRootActivityStop.bind(this);
|
|
1832
1908
|
}
|
|
1833
|
-
startRootActivity(name, rootId, isSampled) {
|
|
1909
|
+
startRootActivity(name, rootId, isSampled, options) {
|
|
1834
1910
|
return this._safety.tryCatchReturn(() => {
|
|
1835
1911
|
utility.requireArgument(name, 'name');
|
|
1836
|
-
const newRootActivity = new RootActivityImpl(name, this._onRootActivityStoppedCallback, this._onActivityErrorCallback, rootId, isSampled);
|
|
1912
|
+
const newRootActivity = new RootActivityImpl(name, this._onRootActivityStoppedCallback, this._onActivityErrorCallback, rootId, isSampled, options === null || options === void 0 ? void 0 : options.perfStartOverride);
|
|
1837
1913
|
if (!this._allowMulti) {
|
|
1914
|
+
const entry = {
|
|
1915
|
+
id: newRootActivity.getId(),
|
|
1916
|
+
name,
|
|
1917
|
+
startPerfTime: newRootActivity.getStartPerfTime(),
|
|
1918
|
+
isSampled: newRootActivity.getIsSampled()
|
|
1919
|
+
};
|
|
1920
|
+
this._rootActivityHistory.add(entry);
|
|
1838
1921
|
if (this._singleRootActivity && !this._singleRootActivity.isStopped) {
|
|
1839
1922
|
const preRootId = this._singleRootActivity.getId();
|
|
1840
1923
|
this._singleRootActivity.terminate();
|
|
@@ -1846,6 +1929,11 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
1846
1929
|
}, rootActivityNoOp);
|
|
1847
1930
|
}
|
|
1848
1931
|
_handleRootActivityStop(detail) {
|
|
1932
|
+
const historyEntry = this._rootActivityHistory.findById(detail.id);
|
|
1933
|
+
if (historyEntry) {
|
|
1934
|
+
historyEntry.stopPerfTime = detail.stopPerfTime;
|
|
1935
|
+
historyEntry.startPerfTime = detail.startPerfTime;
|
|
1936
|
+
}
|
|
1849
1937
|
if (detail.stopReason === discarded) {
|
|
1850
1938
|
return;
|
|
1851
1939
|
}
|
|
@@ -1870,6 +1958,9 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
1870
1958
|
_initMetrics() {
|
|
1871
1959
|
return new MetricsImpl(this.name, () => this.name);
|
|
1872
1960
|
}
|
|
1961
|
+
getRootActivityHistoryEntry(atTime) {
|
|
1962
|
+
return this._rootActivityHistory.findByTime(atTime);
|
|
1963
|
+
}
|
|
1873
1964
|
}
|
|
1874
1965
|
|
|
1875
1966
|
const pathLimit = 5;
|
|
@@ -2235,6 +2326,10 @@ class NextgenImpl {
|
|
|
2235
2326
|
var _a;
|
|
2236
2327
|
return (_a = this._appInstr) === null || _a === void 0 ? void 0 : _a.name;
|
|
2237
2328
|
}
|
|
2329
|
+
getRootActivityHistoryEntryByTime(atTime) {
|
|
2330
|
+
var _a;
|
|
2331
|
+
return (_a = this._appInstr) === null || _a === void 0 ? void 0 : _a.getRootActivityHistoryEntry(atTime);
|
|
2332
|
+
}
|
|
2238
2333
|
addLog(loggerName, schema, data, timestamp, rootId) {
|
|
2239
2334
|
var _a, _b, _c;
|
|
2240
2335
|
payloadUtility.checkInputs(schema, data);
|
|
@@ -2535,7 +2630,7 @@ class ConsoleCollector {
|
|
|
2535
2630
|
}
|
|
2536
2631
|
}
|
|
2537
2632
|
|
|
2538
|
-
const version = '250.
|
|
2633
|
+
const version = '250.6.0';
|
|
2539
2634
|
|
|
2540
2635
|
const idleDetector = new IdleDetectorImpl({
|
|
2541
2636
|
logThreshold: 300,
|