@atlaskit/react-ufo 3.13.19 → 3.13.21
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 +16 -0
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +23 -10
- package/dist/cjs/interaction-metrics/index.js +25 -3
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +9 -3
- package/dist/es2019/interaction-metrics/index.js +25 -3
- package/dist/esm/create-payload/utils/get-vc-metrics.js +23 -10
- package/dist/esm/interaction-metrics/index.js +25 -3
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 3.13.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169263](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169263)
|
|
8
|
+
[`42bff795e359c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/42bff795e359c) -
|
|
9
|
+
Add vc to interactions
|
|
10
|
+
|
|
11
|
+
## 3.13.20
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#169139](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169139)
|
|
16
|
+
[`b4d6e4e5e7a39`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4d6e4e5e7a39) -
|
|
17
|
+
AFO-4009 simplify UFO timeout to be 60s uniformly (behind fg)
|
|
18
|
+
|
|
3
19
|
## 3.13.19
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -34,30 +34,43 @@ function _getVCMetrics() {
|
|
|
34
34
|
}
|
|
35
35
|
return _context.abrupt("return", {});
|
|
36
36
|
case 3:
|
|
37
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_enable_interactions_vc')) {
|
|
38
|
+
_context.next = 8;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press')) {
|
|
42
|
+
_context.next = 6;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
return _context.abrupt("return", {});
|
|
46
|
+
case 6:
|
|
47
|
+
_context.next = 10;
|
|
48
|
+
break;
|
|
49
|
+
case 8:
|
|
37
50
|
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition')) {
|
|
38
|
-
_context.next =
|
|
51
|
+
_context.next = 10;
|
|
39
52
|
break;
|
|
40
53
|
}
|
|
41
54
|
return _context.abrupt("return", {});
|
|
42
|
-
case
|
|
55
|
+
case 10:
|
|
43
56
|
interactionStatus = (0, _getInteractionStatus.default)(interaction);
|
|
44
57
|
pageVisibilityUpToTTAI = (0, _getPageVisibilityUpToTtai.default)(interaction);
|
|
45
58
|
shouldReportVCMetrics = interactionStatus.originalInteractionStatus === 'SUCCEEDED' && pageVisibilityUpToTTAI === 'visible';
|
|
46
59
|
if (!(!shouldReportVCMetrics && (0, _platformFeatureFlags.fg)('platform_ufo_no_vc_on_aborted'))) {
|
|
47
|
-
_context.next =
|
|
60
|
+
_context.next = 16;
|
|
48
61
|
break;
|
|
49
62
|
}
|
|
50
63
|
(0, _vc.getVCObserver)().stop(interaction.ufoName);
|
|
51
64
|
return _context.abrupt("return", {});
|
|
52
|
-
case
|
|
53
|
-
isSSREnabled = (config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName));
|
|
65
|
+
case 16:
|
|
66
|
+
isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
|
|
54
67
|
ssr = interaction.type === 'page_load' && isSSREnabled ? {
|
|
55
68
|
ssr: (0, _getSsrDoneTimeValue.default)(config)
|
|
56
69
|
} : null;
|
|
57
70
|
_interactionMetrics.postInteractionLog.setVCObserverSSRConfig(ssr);
|
|
58
71
|
tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
|
|
59
72
|
prefix = 'ufo';
|
|
60
|
-
_context.next =
|
|
73
|
+
_context.next = 23;
|
|
61
74
|
return (0, _vc.getVCObserver)().getVCResult(_objectSpread({
|
|
62
75
|
start: interaction.start,
|
|
63
76
|
stop: interaction.end,
|
|
@@ -70,7 +83,7 @@ function _getVCMetrics() {
|
|
|
70
83
|
interactionId: interaction.id,
|
|
71
84
|
includeSSRRatio: (_config$vc3 = config.vc) === null || _config$vc3 === void 0 ? void 0 : _config$vc3.includeSSRRatio
|
|
72
85
|
}, ssr));
|
|
73
|
-
case
|
|
86
|
+
case 23:
|
|
74
87
|
result = _context.sent;
|
|
75
88
|
if ((_config$experimentalI = config.experimentalInteractionMetrics) !== null && _config$experimentalI !== void 0 && _config$experimentalI.enabled) {
|
|
76
89
|
(0, _vc.getVCObserver)().stop(interaction.ufoName);
|
|
@@ -82,15 +95,15 @@ function _getVCMetrics() {
|
|
|
82
95
|
return revision === mostRecentVCRevision;
|
|
83
96
|
});
|
|
84
97
|
if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
|
|
85
|
-
_context.next =
|
|
98
|
+
_context.next = 30;
|
|
86
99
|
break;
|
|
87
100
|
}
|
|
88
101
|
return _context.abrupt("return", result);
|
|
89
|
-
case
|
|
102
|
+
case 30:
|
|
90
103
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
91
104
|
'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
|
|
92
105
|
}));
|
|
93
|
-
case
|
|
106
|
+
case 31:
|
|
94
107
|
case "end":
|
|
95
108
|
return _context.stop();
|
|
96
109
|
}
|
|
@@ -49,6 +49,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
49
49
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
50
50
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
51
51
|
var _uuid = require("uuid");
|
|
52
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
52
53
|
var _coinflip = _interopRequireDefault(require("../coinflip"));
|
|
53
54
|
var _config = require("../config");
|
|
54
55
|
var _createExperimentalInteractionMetricsPayload = require("../create-experimental-interaction-metrics-payload");
|
|
@@ -855,6 +856,21 @@ function addNewInteraction(interactionId, ufoName, type, startTime, rate, labelS
|
|
|
855
856
|
});
|
|
856
857
|
}
|
|
857
858
|
}
|
|
859
|
+
if (type === 'press' && (0, _platformFeatureFlags.fg)('platform_ufo_enable_interactions_vc')) {
|
|
860
|
+
var _getConfig13;
|
|
861
|
+
(0, _vc.getVCObserver)().start({
|
|
862
|
+
startTime: startTime,
|
|
863
|
+
experienceKey: ufoName
|
|
864
|
+
});
|
|
865
|
+
postInteractionLog.startVCObserver({
|
|
866
|
+
startTime: startTime
|
|
867
|
+
});
|
|
868
|
+
if ((_getConfig13 = (0, _config.getConfig)()) !== null && _getConfig13 !== void 0 && (_getConfig13 = _getConfig13.experimentalInteractionMetrics) !== null && _getConfig13 !== void 0 && _getConfig13.enabled) {
|
|
869
|
+
_createExperimentalInteractionMetricsPayload.experimentalVC.start({
|
|
870
|
+
startTime: startTime
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
858
874
|
}
|
|
859
875
|
function addBrowserMetricEvent(event) {
|
|
860
876
|
var interaction = getActiveInteraction();
|
|
@@ -863,7 +879,9 @@ function addBrowserMetricEvent(event) {
|
|
|
863
879
|
interaction.legacyMetrics = interaction.legacyMetrics || [];
|
|
864
880
|
interaction.legacyMetrics.push(event);
|
|
865
881
|
if ((interaction.type === 'page_load' || interaction.type === 'transition') && ((_event$config = event.config) === null || _event$config === void 0 ? void 0 : _event$config.type) === 'PAGE_LOAD') {
|
|
866
|
-
|
|
882
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_timeout_simplification')) {
|
|
883
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
884
|
+
}
|
|
867
885
|
removeHoldByID(interaction.id, interaction.ufoName);
|
|
868
886
|
}
|
|
869
887
|
}
|
|
@@ -882,7 +900,9 @@ function addApdexToAll(apdex) {
|
|
|
882
900
|
// do nothing
|
|
883
901
|
}
|
|
884
902
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
885
|
-
|
|
903
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_timeout_simplification')) {
|
|
904
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
905
|
+
}
|
|
886
906
|
removeHoldByID(key, interaction.ufoName);
|
|
887
907
|
}
|
|
888
908
|
});
|
|
@@ -902,7 +922,9 @@ function addApdex(interactionId, apdexInfo) {
|
|
|
902
922
|
// do nothing
|
|
903
923
|
}
|
|
904
924
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
905
|
-
|
|
925
|
+
if (!(0, _platformFeatureFlags.fg)('platform_ufo_timeout_simplification')) {
|
|
926
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
927
|
+
}
|
|
906
928
|
removeHoldByID(interactionId, interaction.ufoName);
|
|
907
929
|
}
|
|
908
930
|
}
|
|
@@ -11,8 +11,14 @@ async function getVCMetrics(interaction) {
|
|
|
11
11
|
if (!(config !== null && config !== void 0 && (_config$vc = config.vc) !== null && _config$vc !== void 0 && _config$vc.enabled)) {
|
|
12
12
|
return {};
|
|
13
13
|
}
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (fg('platform_ufo_enable_interactions_vc')) {
|
|
15
|
+
if (interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press') {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
if (interaction.type !== 'page_load' && interaction.type !== 'transition') {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
16
22
|
}
|
|
17
23
|
const interactionStatus = getInteractionStatus(interaction);
|
|
18
24
|
const pageVisibilityUpToTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
@@ -21,7 +27,7 @@ async function getVCMetrics(interaction) {
|
|
|
21
27
|
getVCObserver().stop(interaction.ufoName);
|
|
22
28
|
return {};
|
|
23
29
|
}
|
|
24
|
-
const isSSREnabled = (config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 ? void 0 : (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName));
|
|
30
|
+
const isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 ? void 0 : (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
|
|
25
31
|
const ssr = interaction.type === 'page_load' && isSSREnabled ? {
|
|
26
32
|
ssr: getSSRDoneTimeValue(config)
|
|
27
33
|
} : null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { v4 as createUUID } from 'uuid';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import coinflip from '../coinflip';
|
|
3
4
|
import { getAwaitBM3TTIList, getCapabilityRate, getConfig } from '../config';
|
|
4
5
|
import { experimentalVC, getExperimentalVCMetrics, onExperimentalInteractionComplete } from '../create-experimental-interaction-metrics-payload';
|
|
@@ -731,6 +732,21 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
|
|
|
731
732
|
});
|
|
732
733
|
}
|
|
733
734
|
}
|
|
735
|
+
if (type === 'press' && fg('platform_ufo_enable_interactions_vc')) {
|
|
736
|
+
var _getConfig13, _getConfig13$experime;
|
|
737
|
+
getVCObserver().start({
|
|
738
|
+
startTime,
|
|
739
|
+
experienceKey: ufoName
|
|
740
|
+
});
|
|
741
|
+
postInteractionLog.startVCObserver({
|
|
742
|
+
startTime
|
|
743
|
+
});
|
|
744
|
+
if ((_getConfig13 = getConfig()) !== null && _getConfig13 !== void 0 && (_getConfig13$experime = _getConfig13.experimentalInteractionMetrics) !== null && _getConfig13$experime !== void 0 && _getConfig13$experime.enabled) {
|
|
745
|
+
experimentalVC.start({
|
|
746
|
+
startTime
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
}
|
|
734
750
|
}
|
|
735
751
|
export function addBrowserMetricEvent(event) {
|
|
736
752
|
const interaction = getActiveInteraction();
|
|
@@ -739,7 +755,9 @@ export function addBrowserMetricEvent(event) {
|
|
|
739
755
|
interaction.legacyMetrics = interaction.legacyMetrics || [];
|
|
740
756
|
interaction.legacyMetrics.push(event);
|
|
741
757
|
if ((interaction.type === 'page_load' || interaction.type === 'transition') && ((_event$config = event.config) === null || _event$config === void 0 ? void 0 : _event$config.type) === 'PAGE_LOAD') {
|
|
742
|
-
|
|
758
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
759
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
760
|
+
}
|
|
743
761
|
removeHoldByID(interaction.id, interaction.ufoName);
|
|
744
762
|
}
|
|
745
763
|
}
|
|
@@ -758,7 +776,9 @@ export function addApdexToAll(apdex) {
|
|
|
758
776
|
// do nothing
|
|
759
777
|
}
|
|
760
778
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
761
|
-
|
|
779
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
780
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
781
|
+
}
|
|
762
782
|
removeHoldByID(key, interaction.ufoName);
|
|
763
783
|
}
|
|
764
784
|
});
|
|
@@ -778,7 +798,9 @@ export function addApdex(interactionId, apdexInfo) {
|
|
|
778
798
|
// do nothing
|
|
779
799
|
}
|
|
780
800
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
781
|
-
|
|
801
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
802
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
803
|
+
}
|
|
782
804
|
removeHoldByID(interactionId, interaction.ufoName);
|
|
783
805
|
}
|
|
784
806
|
}
|
|
@@ -27,30 +27,43 @@ function _getVCMetrics() {
|
|
|
27
27
|
}
|
|
28
28
|
return _context.abrupt("return", {});
|
|
29
29
|
case 3:
|
|
30
|
+
if (!fg('platform_ufo_enable_interactions_vc')) {
|
|
31
|
+
_context.next = 8;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition' && interaction.type !== 'press')) {
|
|
35
|
+
_context.next = 6;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return _context.abrupt("return", {});
|
|
39
|
+
case 6:
|
|
40
|
+
_context.next = 10;
|
|
41
|
+
break;
|
|
42
|
+
case 8:
|
|
30
43
|
if (!(interaction.type !== 'page_load' && interaction.type !== 'transition')) {
|
|
31
|
-
_context.next =
|
|
44
|
+
_context.next = 10;
|
|
32
45
|
break;
|
|
33
46
|
}
|
|
34
47
|
return _context.abrupt("return", {});
|
|
35
|
-
case
|
|
48
|
+
case 10:
|
|
36
49
|
interactionStatus = getInteractionStatus(interaction);
|
|
37
50
|
pageVisibilityUpToTTAI = getPageVisibilityUpToTTAI(interaction);
|
|
38
51
|
shouldReportVCMetrics = interactionStatus.originalInteractionStatus === 'SUCCEEDED' && pageVisibilityUpToTTAI === 'visible';
|
|
39
52
|
if (!(!shouldReportVCMetrics && fg('platform_ufo_no_vc_on_aborted'))) {
|
|
40
|
-
_context.next =
|
|
53
|
+
_context.next = 16;
|
|
41
54
|
break;
|
|
42
55
|
}
|
|
43
56
|
getVCObserver().stop(interaction.ufoName);
|
|
44
57
|
return _context.abrupt("return", {});
|
|
45
|
-
case
|
|
46
|
-
isSSREnabled = (config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName));
|
|
58
|
+
case 16:
|
|
59
|
+
isSSREnabled = interaction.type === 'page_load' && ((config === null || config === void 0 ? void 0 : config.ssr) || (config === null || config === void 0 || (_config$vc$ssrWhiteli = config.vc.ssrWhitelist) === null || _config$vc$ssrWhiteli === void 0 ? void 0 : _config$vc$ssrWhiteli.includes(interaction.ufoName)));
|
|
47
60
|
ssr = interaction.type === 'page_load' && isSSREnabled ? {
|
|
48
61
|
ssr: getSSRDoneTimeValue(config)
|
|
49
62
|
} : null;
|
|
50
63
|
postInteractionLog.setVCObserverSSRConfig(ssr);
|
|
51
64
|
tti = (_interaction$apdex = interaction.apdex) === null || _interaction$apdex === void 0 || (_interaction$apdex = _interaction$apdex[0]) === null || _interaction$apdex === void 0 ? void 0 : _interaction$apdex.stopTime;
|
|
52
65
|
prefix = 'ufo';
|
|
53
|
-
_context.next =
|
|
66
|
+
_context.next = 23;
|
|
54
67
|
return getVCObserver().getVCResult(_objectSpread({
|
|
55
68
|
start: interaction.start,
|
|
56
69
|
stop: interaction.end,
|
|
@@ -63,7 +76,7 @@ function _getVCMetrics() {
|
|
|
63
76
|
interactionId: interaction.id,
|
|
64
77
|
includeSSRRatio: (_config$vc3 = config.vc) === null || _config$vc3 === void 0 ? void 0 : _config$vc3.includeSSRRatio
|
|
65
78
|
}, ssr));
|
|
66
|
-
case
|
|
79
|
+
case 23:
|
|
67
80
|
result = _context.sent;
|
|
68
81
|
if ((_config$experimentalI = config.experimentalInteractionMetrics) !== null && _config$experimentalI !== void 0 && _config$experimentalI.enabled) {
|
|
69
82
|
getVCObserver().stop(interaction.ufoName);
|
|
@@ -75,15 +88,15 @@ function _getVCMetrics() {
|
|
|
75
88
|
return revision === mostRecentVCRevision;
|
|
76
89
|
});
|
|
77
90
|
if (!(!shouldReportVCMetrics || !(mostRecentVCRevisionPayload !== null && mostRecentVCRevisionPayload !== void 0 && mostRecentVCRevisionPayload.clean))) {
|
|
78
|
-
_context.next =
|
|
91
|
+
_context.next = 30;
|
|
79
92
|
break;
|
|
80
93
|
}
|
|
81
94
|
return _context.abrupt("return", result);
|
|
82
|
-
case
|
|
95
|
+
case 30:
|
|
83
96
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, result), {}, {
|
|
84
97
|
'metric:vc90': mostRecentVCRevisionPayload['metric:vc90']
|
|
85
98
|
}));
|
|
86
|
-
case
|
|
99
|
+
case 31:
|
|
87
100
|
case "end":
|
|
88
101
|
return _context.stop();
|
|
89
102
|
}
|
|
@@ -9,6 +9,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
9
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
10
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
11
|
import { v4 as createUUID } from 'uuid';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import coinflip from '../coinflip';
|
|
13
14
|
import { getAwaitBM3TTIList, getCapabilityRate, getConfig } from '../config';
|
|
14
15
|
import { experimentalVC, getExperimentalVCMetrics, onExperimentalInteractionComplete } from '../create-experimental-interaction-metrics-payload';
|
|
@@ -810,6 +811,21 @@ export function addNewInteraction(interactionId, ufoName, type, startTime, rate,
|
|
|
810
811
|
});
|
|
811
812
|
}
|
|
812
813
|
}
|
|
814
|
+
if (type === 'press' && fg('platform_ufo_enable_interactions_vc')) {
|
|
815
|
+
var _getConfig13;
|
|
816
|
+
getVCObserver().start({
|
|
817
|
+
startTime: startTime,
|
|
818
|
+
experienceKey: ufoName
|
|
819
|
+
});
|
|
820
|
+
postInteractionLog.startVCObserver({
|
|
821
|
+
startTime: startTime
|
|
822
|
+
});
|
|
823
|
+
if ((_getConfig13 = getConfig()) !== null && _getConfig13 !== void 0 && (_getConfig13 = _getConfig13.experimentalInteractionMetrics) !== null && _getConfig13 !== void 0 && _getConfig13.enabled) {
|
|
824
|
+
experimentalVC.start({
|
|
825
|
+
startTime: startTime
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
}
|
|
813
829
|
}
|
|
814
830
|
export function addBrowserMetricEvent(event) {
|
|
815
831
|
var interaction = getActiveInteraction();
|
|
@@ -818,7 +834,9 @@ export function addBrowserMetricEvent(event) {
|
|
|
818
834
|
interaction.legacyMetrics = interaction.legacyMetrics || [];
|
|
819
835
|
interaction.legacyMetrics.push(event);
|
|
820
836
|
if ((interaction.type === 'page_load' || interaction.type === 'transition') && ((_event$config = event.config) === null || _event$config === void 0 ? void 0 : _event$config.type) === 'PAGE_LOAD') {
|
|
821
|
-
|
|
837
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
838
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
839
|
+
}
|
|
822
840
|
removeHoldByID(interaction.id, interaction.ufoName);
|
|
823
841
|
}
|
|
824
842
|
}
|
|
@@ -837,7 +855,9 @@ export function addApdexToAll(apdex) {
|
|
|
837
855
|
// do nothing
|
|
838
856
|
}
|
|
839
857
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
840
|
-
|
|
858
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
859
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
860
|
+
}
|
|
841
861
|
removeHoldByID(key, interaction.ufoName);
|
|
842
862
|
}
|
|
843
863
|
});
|
|
@@ -857,7 +877,9 @@ export function addApdex(interactionId, apdexInfo) {
|
|
|
857
877
|
// do nothing
|
|
858
878
|
}
|
|
859
879
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
860
|
-
|
|
880
|
+
if (!fg('platform_ufo_timeout_simplification')) {
|
|
881
|
+
interaction.changeTimeout(CLEANUP_TIMEOUT_AFTER_APDEX);
|
|
882
|
+
}
|
|
861
883
|
removeHoldByID(interactionId, interaction.ufoName);
|
|
862
884
|
}
|
|
863
885
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.21",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -168,6 +168,12 @@
|
|
|
168
168
|
},
|
|
169
169
|
"platform_ufo_rll_placeholder_ignore": {
|
|
170
170
|
"type": "boolean"
|
|
171
|
+
},
|
|
172
|
+
"platform_ufo_timeout_simplification": {
|
|
173
|
+
"type": "boolean"
|
|
174
|
+
},
|
|
175
|
+
"platform_ufo_enable_interactions_vc": {
|
|
176
|
+
"type": "boolean"
|
|
171
177
|
}
|
|
172
178
|
}
|
|
173
179
|
}
|