o11y 258.15.0 → 260.0.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 +103 -12
- package/dist/modules/o11y/client/client.js.map +1 -1
- package/dist/modules/o11y/client/interfaces/Activity.d.ts +3 -0
- package/dist/modules/o11y/client/interfaces/ActivityDetail.d.ts +4 -0
- package/dist/modules/o11y/client/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/client/interfaces/Instrumentation.d.ts +1 -0
- package/dist/modules/o11y/client/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/client/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/client/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/client/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/client/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/client/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/client/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/client/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/client/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/client/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/client/version.d.ts +2 -2
- package/dist/modules/o11y/collectors/interfaces/Activity.d.ts +3 -0
- package/dist/modules/o11y/collectors/interfaces/ActivityDetail.d.ts +4 -0
- package/dist/modules/o11y/collectors/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/collectors/interfaces/Instrumentation.d.ts +1 -0
- package/dist/modules/o11y/collectors/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/collectors/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/collectors/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/collectors/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/collectors/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/collectors/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/collectors/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/collectors/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/collectors/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/collectors/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/collectors/version.d.ts +2 -2
- 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/Activity.d.ts +3 -0
- package/dist/modules/o11y/core_envelope/interfaces/ActivityDetail.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 +1 -0
- package/dist/modules/o11y/core_envelope/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/core_envelope/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/core_envelope/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/core_envelope/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/core_envelope/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/core_envelope/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/core_envelope/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/core_envelope/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/core_envelope/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/core_envelope/version.d.ts +2 -2
- package/dist/modules/o11y/shared/interfaces/Activity.d.ts +3 -0
- package/dist/modules/o11y/shared/interfaces/ActivityDetail.d.ts +4 -0
- package/dist/modules/o11y/shared/interfaces/ActivityStartOptions.d.ts +3 -0
- package/dist/modules/o11y/shared/interfaces/Instrumentation.d.ts +1 -0
- package/dist/modules/o11y/shared/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/shared/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/shared/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/shared/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/shared/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/shared/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/shared/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/shared/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/shared/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/shared/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/shared/shared.js +15 -0
- package/dist/modules/o11y/shared/shared.js.map +1 -1
- package/dist/modules/o11y/shared/version.d.ts +2 -2
- package/dist/modules/o11y/simple_collector/interfaces/Activity.d.ts +3 -0
- package/dist/modules/o11y/simple_collector/interfaces/ActivityDetail.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 +1 -0
- package/dist/modules/o11y/simple_collector/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/simple_collector/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/simple_collector/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/simple_collector/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/simple_collector/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/simple_collector/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/simple_collector/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/simple_collector/version.d.ts +2 -2
- package/dist/modules/o11y/web_vitals/interfaces/Activity.d.ts +3 -0
- package/dist/modules/o11y/web_vitals/interfaces/ActivityDetail.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 +1 -0
- package/dist/modules/o11y/web_vitals/interfaces/InstrumentationContext.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/interfaces-private/ActivityData.d.ts +3 -0
- package/dist/modules/o11y/web_vitals/library/ActivityImpl.d.ts +7 -1
- package/dist/modules/o11y/web_vitals/library/ActivityNoOp.d.ts +3 -0
- package/dist/modules/o11y/web_vitals/library/AppInstrumentationImpl.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/library/RootActivityImpl.d.ts +4 -1
- package/dist/modules/o11y/web_vitals/library/RootActivityNoOp.d.ts +4 -1
- package/dist/modules/o11y/web_vitals/library/Tracing.d.ts +2 -0
- package/dist/modules/o11y/web_vitals/shared/Utility.d.ts +2 -1
- package/dist/modules/o11y/web_vitals/version.d.ts +2 -2
- package/dist/modules/o11y/web_vitals/web_vitals.js +7 -10
- package/dist/modules/o11y/web_vitals/web_vitals.js.map +1 -1
- package/package.json +3 -3
|
@@ -511,10 +511,18 @@ const headerSpanId = 'X-B3-SpanId';
|
|
|
511
511
|
const headerSampled = 'X-B3-Sampled';
|
|
512
512
|
const headerParentSpanId = 'X-B3-ParentSpanId';
|
|
513
513
|
const headerRequestId = 'X-SFDC-Request-Id';
|
|
514
|
+
const headerBaggage = 'baggage';
|
|
514
515
|
const defaultActivityNameForFetch = 'fetch';
|
|
515
516
|
const defaultActivityNameForXhrSend = 'xhr_send';
|
|
516
517
|
const defaultTimingActivityName = 'perf-timing';
|
|
517
518
|
const defaultFuzzyMapRange = 50;
|
|
519
|
+
const userSettableHeaders = [
|
|
520
|
+
headerBaggage,
|
|
521
|
+
headerTraceId,
|
|
522
|
+
headerSpanId,
|
|
523
|
+
headerParentSpanId,
|
|
524
|
+
headerSampled
|
|
525
|
+
];
|
|
518
526
|
const o11yInfoForXHR = new WeakMap();
|
|
519
527
|
class Tracing {
|
|
520
528
|
constructor(_instr, _idleDetector) {
|
|
@@ -553,6 +561,18 @@ class Tracing {
|
|
|
553
561
|
}
|
|
554
562
|
return text;
|
|
555
563
|
}
|
|
564
|
+
static setHeaders(headers) {
|
|
565
|
+
if (headers === undefined) {
|
|
566
|
+
Tracing._userHeaders = {};
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
Object.entries(headers).forEach(([key]) => {
|
|
570
|
+
if (!userSettableHeaders.includes(key)) {
|
|
571
|
+
delete headers[key];
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
Tracing._userHeaders = headers;
|
|
575
|
+
}
|
|
556
576
|
static getHeaders(traceId, spanId, isSampled, options) {
|
|
557
577
|
utility.requireArgument(spanId, 'spanId', 'string');
|
|
558
578
|
const useB3Headers = options === null || options === void 0 ? void 0 : options.useB3Headers;
|
|
@@ -668,6 +688,13 @@ class Tracing {
|
|
|
668
688
|
traceHeaders = undefined;
|
|
669
689
|
}
|
|
670
690
|
}
|
|
691
|
+
if (Tracing._userHeaders && Object.keys(Tracing._userHeaders).length > 0) {
|
|
692
|
+
traceHeaders = { ...traceHeaders };
|
|
693
|
+
Object.entries(Tracing._userHeaders).forEach(([key, value]) => {
|
|
694
|
+
traceHeaders[key] = value;
|
|
695
|
+
});
|
|
696
|
+
Tracing._userHeaders = undefined;
|
|
697
|
+
}
|
|
671
698
|
return traceHeaders || {};
|
|
672
699
|
}
|
|
673
700
|
static _extractHeader(headerName, input, init) {
|
|
@@ -995,13 +1022,16 @@ const stopReason = {
|
|
|
995
1022
|
discarded
|
|
996
1023
|
};
|
|
997
1024
|
class ActivityImpl {
|
|
998
|
-
constructor(_name, _rootId, _onStopped, _onError, timeout, id, _isSampled, _startPerfTime, _noRerooting) {
|
|
1025
|
+
constructor(_name, _rootId, _onStopped, _onError, timeout, id, _isSampled, _startPerfTime, _noRerooting, _isExternal, _parentActivity) {
|
|
1026
|
+
var _a, _b;
|
|
999
1027
|
this._name = _name;
|
|
1000
1028
|
this._rootId = _rootId;
|
|
1001
1029
|
this._onStopped = _onStopped;
|
|
1002
1030
|
this._onError = _onError;
|
|
1003
1031
|
this._isSampled = _isSampled;
|
|
1004
1032
|
this._noRerooting = _noRerooting;
|
|
1033
|
+
this._isExternal = _isExternal;
|
|
1034
|
+
this._parentActivity = _parentActivity;
|
|
1005
1035
|
this._isRoot = false;
|
|
1006
1036
|
this._errorCount = 0;
|
|
1007
1037
|
this._timerOverridden = TimerOverride.none;
|
|
@@ -1018,7 +1048,7 @@ class ActivityImpl {
|
|
|
1018
1048
|
try {
|
|
1019
1049
|
performance.mark(this._perfId);
|
|
1020
1050
|
}
|
|
1021
|
-
catch (
|
|
1051
|
+
catch (_c) {
|
|
1022
1052
|
this._usePerf = false;
|
|
1023
1053
|
}
|
|
1024
1054
|
}
|
|
@@ -1032,6 +1062,9 @@ class ActivityImpl {
|
|
|
1032
1062
|
}, timeout);
|
|
1033
1063
|
}
|
|
1034
1064
|
this._safety = new PublicSafety();
|
|
1065
|
+
this._externalParentActivity = ((_a = this._parentActivity) === null || _a === void 0 ? void 0 : _a.isExternal())
|
|
1066
|
+
? this._parentActivity
|
|
1067
|
+
: (_b = this._parentActivity) === null || _b === void 0 ? void 0 : _b.getExternalParentActivity();
|
|
1035
1068
|
}
|
|
1036
1069
|
get id() {
|
|
1037
1070
|
return this._id;
|
|
@@ -1045,6 +1078,16 @@ class ActivityImpl {
|
|
|
1045
1078
|
get stopReason() {
|
|
1046
1079
|
return this._stopReason;
|
|
1047
1080
|
}
|
|
1081
|
+
getParentActivity() {
|
|
1082
|
+
return this._parentActivity;
|
|
1083
|
+
}
|
|
1084
|
+
isExternal() {
|
|
1085
|
+
var _a;
|
|
1086
|
+
return (_a = this._isExternal) !== null && _a !== void 0 ? _a : false;
|
|
1087
|
+
}
|
|
1088
|
+
getExternalParentActivity() {
|
|
1089
|
+
return this._externalParentActivity;
|
|
1090
|
+
}
|
|
1048
1091
|
error(error, userSchemaOrText, userData) {
|
|
1049
1092
|
this._safety.tryCatch(() => {
|
|
1050
1093
|
this._errorCount += 1;
|
|
@@ -1165,7 +1208,10 @@ class ActivityImpl {
|
|
|
1165
1208
|
errorCount: this._errorCount,
|
|
1166
1209
|
isSampled: this.getIsSampled(),
|
|
1167
1210
|
timerOverridden: this._timerOverridden,
|
|
1168
|
-
noRerooting: this._noRerooting
|
|
1211
|
+
noRerooting: this._noRerooting,
|
|
1212
|
+
isExternal: this._isExternal,
|
|
1213
|
+
parentActivity: this._parentActivity,
|
|
1214
|
+
externalParentActivity: this._externalParentActivity
|
|
1169
1215
|
};
|
|
1170
1216
|
}
|
|
1171
1217
|
getTraceHeaders(options) {
|
|
@@ -1218,6 +1264,15 @@ class ActivityNoOp {
|
|
|
1218
1264
|
getErrorCount() {
|
|
1219
1265
|
return 0;
|
|
1220
1266
|
}
|
|
1267
|
+
getParentActivity() {
|
|
1268
|
+
return undefined;
|
|
1269
|
+
}
|
|
1270
|
+
isExternal() {
|
|
1271
|
+
return false;
|
|
1272
|
+
}
|
|
1273
|
+
getExternalParentActivity() {
|
|
1274
|
+
return undefined;
|
|
1275
|
+
}
|
|
1221
1276
|
}
|
|
1222
1277
|
const activityNoOp = Object.freeze(new ActivityNoOp());
|
|
1223
1278
|
|
|
@@ -1648,6 +1703,7 @@ class InstrumentationImpl {
|
|
|
1648
1703
|
var _a;
|
|
1649
1704
|
utility.requireArgument(name, 'name');
|
|
1650
1705
|
utility.requireArgumentIfDefined(options, 'options', 'object');
|
|
1706
|
+
const parentActivity = utility.validateParentActivityType(options === null || options === void 0 ? void 0 : options.isExternal, options === null || options === void 0 ? void 0 : options.parentActivity);
|
|
1651
1707
|
let context;
|
|
1652
1708
|
let noRerooting = (options === null || options === void 0 ? void 0 : options.perfStartOverride) !== undefined;
|
|
1653
1709
|
const rootId = (_a = options === null || options === void 0 ? void 0 : options.instrumentationContext) === null || _a === void 0 ? void 0 : _a.rootId;
|
|
@@ -1655,17 +1711,22 @@ class InstrumentationImpl {
|
|
|
1655
1711
|
noRerooting = true;
|
|
1656
1712
|
context = {
|
|
1657
1713
|
rootId,
|
|
1658
|
-
isRootActivitySampled: options.instrumentationContext.isRootActivitySampled
|
|
1714
|
+
isRootActivitySampled: options.instrumentationContext.isRootActivitySampled,
|
|
1715
|
+
isRootActivityExternalSampled: options.instrumentationContext.isRootActivityExternalSampled
|
|
1659
1716
|
};
|
|
1660
1717
|
}
|
|
1661
1718
|
else {
|
|
1662
1719
|
context = this._nextGen.getDefaultInstrumentationContext();
|
|
1663
1720
|
}
|
|
1664
|
-
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);
|
|
1665
1725
|
return activity;
|
|
1666
1726
|
}, activityNoOp, { op: 'startActivity' });
|
|
1667
1727
|
}
|
|
1668
1728
|
_getActivityData(detail) {
|
|
1729
|
+
var _a, _b;
|
|
1669
1730
|
const userPayload = this._wrapUserPayload(detail.userSchemaOrText, detail.userData, true);
|
|
1670
1731
|
return {
|
|
1671
1732
|
id: detail.id,
|
|
@@ -1676,7 +1737,10 @@ class InstrumentationImpl {
|
|
|
1676
1737
|
errorCount: detail.errorCount,
|
|
1677
1738
|
isSampled: detail.isSampled,
|
|
1678
1739
|
timerOverridden: detail.timerOverridden,
|
|
1679
|
-
isRerooted: detail.isRerooted
|
|
1740
|
+
isRerooted: detail.isRerooted,
|
|
1741
|
+
isExternal: detail.isExternal,
|
|
1742
|
+
parentId: (_a = detail.parentActivity) === null || _a === void 0 ? void 0 : _a.getId(),
|
|
1743
|
+
externalParentId: (_b = detail.externalParentActivity) === null || _b === void 0 ? void 0 : _b.getId()
|
|
1680
1744
|
};
|
|
1681
1745
|
}
|
|
1682
1746
|
_handleActivityStop(detail) {
|
|
@@ -1851,6 +1915,10 @@ class InstrumentationImpl {
|
|
|
1851
1915
|
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);
|
|
1852
1916
|
}
|
|
1853
1917
|
}
|
|
1918
|
+
invokeNetworkCallWithHeaders(apiCall, params, headers) {
|
|
1919
|
+
Tracing.setHeaders(headers);
|
|
1920
|
+
return apiCall(...params);
|
|
1921
|
+
}
|
|
1854
1922
|
}
|
|
1855
1923
|
InstrumentationImpl.defaultAppName = 'APP_NOT_REGISTERED';
|
|
1856
1924
|
|
|
@@ -1906,9 +1974,17 @@ class RootActivityHistoryImpl {
|
|
|
1906
1974
|
}
|
|
1907
1975
|
|
|
1908
1976
|
class RootActivityImpl extends ActivityImpl {
|
|
1909
|
-
constructor(name, onStopped, onError, rootId, isSampled, startPerfTime, generatedRootIdLength) {
|
|
1977
|
+
constructor(name, onStopped, onError, rootId, isSampled, startPerfTime, generatedRootIdLength, isExternalSampled) {
|
|
1910
1978
|
super(name, undefined, onStopped, onError, undefined, rootId || utility.generateUniqueId(generatedRootIdLength !== null && generatedRootIdLength !== void 0 ? generatedRootIdLength : 32), isSampled, startPerfTime);
|
|
1911
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;
|
|
1912
1988
|
}
|
|
1913
1989
|
get preRootId() {
|
|
1914
1990
|
return this._preRootId;
|
|
@@ -1954,6 +2030,15 @@ class RootActivityNoOp {
|
|
|
1954
2030
|
getErrorCount() {
|
|
1955
2031
|
return 0;
|
|
1956
2032
|
}
|
|
2033
|
+
getParentActivity() {
|
|
2034
|
+
return undefined;
|
|
2035
|
+
}
|
|
2036
|
+
isExternal() {
|
|
2037
|
+
return false;
|
|
2038
|
+
}
|
|
2039
|
+
getExternalParentActivity() {
|
|
2040
|
+
return undefined;
|
|
2041
|
+
}
|
|
1957
2042
|
}
|
|
1958
2043
|
const rootActivityNoOp = Object.freeze(new RootActivityNoOp());
|
|
1959
2044
|
|
|
@@ -1964,13 +2049,13 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
1964
2049
|
this._rootActivityHistory = new RootActivityHistoryImpl();
|
|
1965
2050
|
this._onRootActivityStoppedCallback = this._handleRootActivityStop.bind(this);
|
|
1966
2051
|
}
|
|
1967
|
-
startRootActivity(name, rootId, isSampled, options) {
|
|
2052
|
+
startRootActivity(name, rootId, isSampled, options, isExternalActivitySampled) {
|
|
1968
2053
|
return this._safety.tryCatchReturn(() => {
|
|
1969
2054
|
utility.requireArgument(name, 'name');
|
|
1970
2055
|
if ((options === null || options === void 0 ? void 0 : options.id) !== undefined) {
|
|
1971
2056
|
throw new Error('Cannot specify id for root activity, use rootId argument instead');
|
|
1972
2057
|
}
|
|
1973
|
-
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);
|
|
1974
2059
|
if (!this._allowMulti) {
|
|
1975
2060
|
const entry = {
|
|
1976
2061
|
id: newRootActivity.getId(),
|
|
@@ -2016,6 +2101,10 @@ class AppInstrumentationImpl extends InstrumentationImpl {
|
|
|
2016
2101
|
var _a;
|
|
2017
2102
|
return (_a = this._singleRootActivity) === null || _a === void 0 ? void 0 : _a.getIsSampled();
|
|
2018
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
|
+
}
|
|
2019
2108
|
_initMetrics() {
|
|
2020
2109
|
return new MetricsImpl(this.name, () => this.name);
|
|
2021
2110
|
}
|
|
@@ -2355,6 +2444,7 @@ class NextgenImpl {
|
|
|
2355
2444
|
registerForLogPrompt: this._appInstr.registerForLogPrompt.bind(this._appInstr),
|
|
2356
2445
|
activity: this._appInstr.activity.bind(this._appInstr),
|
|
2357
2446
|
activityAsync: this._appInstr.activityAsync.bind(this._appInstr),
|
|
2447
|
+
invokeNetworkCallWithHeaders: this._appInstr.invokeNetworkCallWithHeaders.bind(this._appInstr),
|
|
2358
2448
|
startRootActivity: this._appInstr.startRootActivity.bind(this._appInstr),
|
|
2359
2449
|
registerLogCollector: this._isSender ? noOpFunc : this.registerLogCollector.bind(this),
|
|
2360
2450
|
registerMetricsCollector: this._isSender
|
|
@@ -2490,10 +2580,11 @@ class NextgenImpl {
|
|
|
2490
2580
|
return this._autoClickTracker;
|
|
2491
2581
|
}
|
|
2492
2582
|
getDefaultInstrumentationContext() {
|
|
2493
|
-
var _a, _b;
|
|
2583
|
+
var _a, _b, _c;
|
|
2494
2584
|
return {
|
|
2495
2585
|
rootId: (_a = this._appInstr) === null || _a === void 0 ? void 0 : _a.getSingleRootActivityId(),
|
|
2496
|
-
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()
|
|
2497
2588
|
};
|
|
2498
2589
|
}
|
|
2499
2590
|
activateClickTracker() {
|
|
@@ -2709,7 +2800,7 @@ class ConsoleCollector {
|
|
|
2709
2800
|
}
|
|
2710
2801
|
}
|
|
2711
2802
|
|
|
2712
|
-
const version = '
|
|
2803
|
+
const version = '260.0.0';
|
|
2713
2804
|
|
|
2714
2805
|
const idleDetector = new IdleDetectorImpl({
|
|
2715
2806
|
logThreshold: 300,
|