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