Skip to content

Commit 662e16b

Browse files
Added back future code
1 parent 6bd2bf5 commit 662e16b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/libs/telemetry/submitFollowUpAction.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,15 @@ function setFastPath(fastPath: FastPathType, ...optimizations: Optimization[]) {
258258
getSpan(CONST.TELEMETRY.SPAN_SUBMIT_TO_DESTINATION_VISIBLE)?.setAttribute(CONST.TELEMETRY.ATTRIBUTE_FAST_PATH_HANDLER, fastPath);
259259
}
260260

261+
function addOptimization(...optimizations: Optimization[]) {
262+
if (!trackingState) {
263+
return;
264+
}
265+
for (const opt of optimizations) {
266+
trackingState.optimizations.add(opt);
267+
}
268+
}
269+
261270
function cancelTracking() {
262271
if (!trackingState) {
263272
return;
@@ -277,5 +286,5 @@ function isTracking(): boolean {
277286
return trackingState !== null;
278287
}
279288

280-
export {endSubmitFollowUpActionSpan, setPendingSubmitFollowUpAction, getPendingSubmitFollowUpAction, cancelSubmitFollowUpActionSpan, startTracking, setFastPath, isTracking};
289+
export {endSubmitFollowUpActionSpan, setPendingSubmitFollowUpAction, getPendingSubmitFollowUpAction, cancelSubmitFollowUpActionSpan, startTracking, setFastPath, addOptimization, isTracking};
281290
export type {SubmitFollowUpAction, PendingSubmitFollowUpAction, FastPathType, Optimization, SubmitExpenseContext, StartTrackingOptions};

0 commit comments

Comments
 (0)