Send start_time, end_time, and endpoint to FPTI for tracking API request latency
Add new CoreAnalytics object
Add new HttpResponse for sending start/end timing from HttpClient to BraintreeClient
Add new NetworkResponseCallback to pass HttpResponse from HttpClient to BraintreeClient
Previously, SynchronousHttpClient returned the body of the response.
However, this is where we are now obtaining start_time and end_time to analyze the response time of the services. This led to the creation of the HttpResponse object. This object is sent in the new NetworkResponseCallback callback.
The previous HttpResponseCallback callback was sent from BraintreeHttpClient to the clients (i.e. PayPalClient).
By creating a new callback with the HttpResponse object, we avoid making any changes at the payment method client level.
In the BraintreeClient, we receive the NetworkResponseCallback callback from HttpClient, send the necessary event, and return the required information with the original HttpResponseCallback callback.
Summary of changes
start_time
,end_time
, andendpoint
toFPTI
for tracking API request latencyCoreAnalytics
objectHttpResponse
for sending start/end timing fromHttpClient
toBraintreeClient
NetworkResponseCallback
to passHttpResponse
fromHttpClient
toBraintreeClient
Previously,
SynchronousHttpClient
returned the body of the response. However, this is where we are now obtainingstart_time
andend_time
to analyze the response time of the services. This led to the creation of theHttpResponse
object. This object is sent in the newNetworkResponseCallback
callback.The previous
HttpResponseCallback
callback was sent fromBraintreeHttpClient
to the clients (i.e. PayPalClient). By creating a new callback with theHttpResponse
object, we avoid making any changes at the payment method client level.In the
BraintreeClient
, we receive theNetworkResponseCallback
callback fromHttpClient
, send the necessaryevent
, and return the required information with the originalHttpResponseCallback
callback.Checklist
Authors