@@ -14,6 +14,7 @@ import { lazyObservablePromise } from '../../util/observable';
1414import { persist , hydrate } from '../../util/mobx-persist/persist' ;
1515import { ErrorLike , UnreachableCheck } from '../../util/error' ;
1616import { rawHeadersToHeaders } from '../../util/headers' ;
17+ import { trackEvent } from '../../metrics' ;
1718
1819import { EventsStore } from '../events/events-store' ;
1920import { RulesStore } from '../rules/rules-store' ;
@@ -22,6 +23,7 @@ import * as ServerApi from '../../services/server-api';
2223import { HttpExchange } from '../http/exchange' ;
2324import { ResponseHeadEvent , ResponseStreamEvent } from './send-response-model' ;
2425import {
26+ buildRequestInputFromExchange ,
2527 ClientProxyConfig ,
2628 RequestInput ,
2729 requestInputSchema ,
@@ -62,10 +64,20 @@ export class SendStore {
6264 return requestInput ;
6365 }
6466
67+ async addRequestInputFromExchange ( exchange : HttpExchange ) {
68+ trackEvent ( { category : 'Send' , action : 'Resend exchange' } ) ;
69+
70+ this . addRequestInput (
71+ await buildRequestInputFromExchange ( exchange )
72+ ) ;
73+ }
74+
6575 @observable
6676 sentExchange : HttpExchange | undefined ;
6777
6878 readonly sendRequest = async ( requestInput : RequestInput ) => {
79+ trackEvent ( { category : 'Send' , action : 'Sent request' } ) ;
80+
6981 const exchangeId = uuid ( ) ;
7082
7183 const passthroughOptions = this . rulesStore . activePassthroughOptions ;
0 commit comments