Network Traffic Analysis

Network Traffic Analysis

In iOS 10, Apple introduced NSURLSessionTaskMetrics, which provides a wealth of diagnostics and timing info about network requests. can collect and analyze this data for you and combine it with our insights.

Enhanced Network Monitoring

If you have a class that implements NSURLSessionTaskDelegate, add the following implementation:


(void)URLSession:(NSURLSession )session task:(NSURLSessionTask )task didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics
    [[Embrace sharedInstance] logURLSessionTaskMetrics:metrics forURLSessionTask:task];


@available(iOS 10.0, *)
func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) {
    Embrace.sharedInstance().logURLSessionTaskMetrics(metrics, for: task)