Firebase 性能监控如何拦截 iOS 中的传出 http 请求?
How Firebase Performance Monitoring intercepts outgoing http requests in iOS?
来自 firebase 的 help doc,它指出
For all app types, Performance Monitoring automatically collects a
trace for each network request issued by your app, called an HTTP/S
network request trace Performance Monitoring automatically collects
metrics for network requests that use the following networking
libraries: URLSession, URLConnection
他们如何自动跟踪 http 请求?
在 iOS 上,Firebase Performance Monitoring 使用 有效地将对 NSURLConnection
的调用重写为它自己的实现(这又会调用回原始 iOS 实现).这允许 SDK 记录应用程序对 HTTP 请求所做的操作。
来自 firebase 的 help doc,它指出
For all app types, Performance Monitoring automatically collects a trace for each network request issued by your app, called an HTTP/S network request trace Performance Monitoring automatically collects metrics for network requests that use the following networking libraries: URLSession, URLConnection
他们如何自动跟踪 http 请求?
在 iOS 上,Firebase Performance Monitoring 使用 NSURLConnection
的调用重写为它自己的实现(这又会调用回原始 iOS 实现).这允许 SDK 记录应用程序对 HTTP 请求所做的操作。