@@ -19,7 +19,7 @@ import {
1919 getParsedComment ,
2020} from '@libs/ReportUtils' ;
2121import playSound , { SOUNDS } from '@libs/Sound' ;
22- import { startSpan } from '@libs/telemetry/activeSpans ' ;
22+ import { startTracking } from '@libs/telemetry/submitFollowUpAction ' ;
2323import { buildOptimisticTransaction } from '@libs/TransactionUtils' ;
2424import { notifyNewAction } from '@userActions/Report' ;
2525import CONST from '@src/CONST' ;
@@ -510,17 +510,16 @@ function sendMoneyElsewhere({report, quickAction, amount, currency, comment, cur
510510 optimisticChatReportID,
511511 currentUserAccountID,
512512 } ) ;
513- startSpan ( CONST . TELEMETRY . SPAN_SUBMIT_TO_DESTINATION_VISIBLE , {
514- name : 'submit-to-destination-visible' ,
515- op : CONST . TELEMETRY . SPAN_SUBMIT_TO_DESTINATION_VISIBLE ,
516- attributes : {
517- [ CONST . TELEMETRY . ATTRIBUTE_SCENARIO ] : CONST . TELEMETRY . SUBMIT_EXPENSE_SCENARIO . SEND_MONEY ,
518- [ CONST . TELEMETRY . ATTRIBUTE_HAS_RECEIPT ] : ! ! receipt ,
519- [ CONST . TELEMETRY . ATTRIBUTE_IS_FROM_GLOBAL_CREATE ] : isEmptyObject ( report ) || ! report ?. reportID ,
520- [ CONST . TELEMETRY . ATTRIBUTE_IOU_TYPE ] : CONST . IOU . TYPE . PAY ,
521- [ CONST . TELEMETRY . ATTRIBUTE_IOU_REQUEST_TYPE ] : 'pay' ,
513+ startTracking (
514+ {
515+ scenario : CONST . TELEMETRY . SUBMIT_EXPENSE_SCENARIO . SEND_MONEY ,
516+ iouType : CONST . IOU . TYPE . PAY ,
517+ requestType : 'pay' ,
518+ isFromGlobalCreate : isEmptyObject ( report ) || ! report ?. reportID ,
519+ hasReceipt : ! ! receipt ,
522520 } ,
523- } ) ;
521+ { skipSubmitExpenseSpan : true } ,
522+ ) ;
524523 playSound ( SOUNDS . DONE ) ;
525524 API . write ( WRITE_COMMANDS . SEND_MONEY_ELSEWHERE , params , { optimisticData, successData, failureData} ) ;
526525
@@ -543,17 +542,16 @@ function sendMoneyWithWallet({report, quickAction, amount, currency, comment, cu
543542 optimisticChatReportID,
544543 currentUserAccountID,
545544 } ) ;
546- startSpan ( CONST . TELEMETRY . SPAN_SUBMIT_TO_DESTINATION_VISIBLE , {
547- name : 'submit-to-destination-visible' ,
548- op : CONST . TELEMETRY . SPAN_SUBMIT_TO_DESTINATION_VISIBLE ,
549- attributes : {
550- [ CONST . TELEMETRY . ATTRIBUTE_SCENARIO ] : CONST . TELEMETRY . SUBMIT_EXPENSE_SCENARIO . SEND_MONEY ,
551- [ CONST . TELEMETRY . ATTRIBUTE_HAS_RECEIPT ] : ! ! receipt ,
552- [ CONST . TELEMETRY . ATTRIBUTE_IS_FROM_GLOBAL_CREATE ] : isEmptyObject ( report ) || ! report ?. reportID ,
553- [ CONST . TELEMETRY . ATTRIBUTE_IOU_TYPE ] : CONST . IOU . TYPE . PAY ,
554- [ CONST . TELEMETRY . ATTRIBUTE_IOU_REQUEST_TYPE ] : 'pay' ,
545+ startTracking (
546+ {
547+ scenario : CONST . TELEMETRY . SUBMIT_EXPENSE_SCENARIO . SEND_MONEY ,
548+ iouType : CONST . IOU . TYPE . PAY ,
549+ requestType : 'pay' ,
550+ isFromGlobalCreate : isEmptyObject ( report ) || ! report ?. reportID ,
551+ hasReceipt : ! ! receipt ,
555552 } ,
556- } ) ;
553+ { skipSubmitExpenseSpan : true } ,
554+ ) ;
557555 playSound ( SOUNDS . DONE ) ;
558556 API . write ( WRITE_COMMANDS . SEND_MONEY_WITH_WALLET , params , { optimisticData, successData, failureData} ) ;
559557
0 commit comments