New issue
Advanced search Search tips

Issue 831724 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

CronetMetrics doesn't implement all NSURLSessionTaskMetrics properties.

Project Member Reported by kapishnikov@chromium.org, Apr 11 2018

Issue description

CronetMetrics misses the implementation of two properties of the NSURLSessionTaskMetrics interface: taskInterval and redirectCount.

This may cause crash in embedders apps that were collecting metrics previously and would like to collect the same metrics with Cronet.

The crash can manifest itself with this error message:

"terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CronetMetrics taskInterval]: unrecognized selector sent to instance 0x1c0206880'"

The current workaround is not to call the missing methods from the app.

https://cs.chromium.org/chromium/src/components/cronet/ios/cronet_metrics.h?type=cs&q=%22@interface+CronetMetrics+:+NSURLSessionTaskMetrics%22&l=75
 

Comment 1 by j...@snapchat.com, Apr 12 2018

It seems that CronetMetrics.transactionMetrics would always contain only one obj for requests intercepted by cronet, even if it is a redirected request. Code here: https://cs.chromium.org/chromium/src/components/cronet/ios/cronet_metrics.mm?sq=package:chromium&dr&l=238

We probably should follow what apple's NSURLSessionTaskMetrics does, which records all stages in its transactionMetrics array. i.e. the last obj is for the real HTTP for the resource, and the previous ones are for redirecting.
Cc: mef@chromium.org
Owner: lilyhoughton@chromium.org
Status: Assigned (was: Untriaged)
Owner: ----
Status: Available (was: Assigned)
lilyhoughton@ is no longer working on Chromium.
Re #3:

Hi Misha, I would like to know if it is still the case that CronetMetrics.transactionMetrics only has the detailed breakdowns of the last http request for redirection. If so, do we have any plans to implement that support as what iOS stack does?
Labels: -Pri-2 Pri-3
Hi Jni, unfortunately we don't have anybody working on it right now. 
I'm not sure how difficult would it be to support the iOS stack behavior.

I've lowered the priority to represent current status, but will be happy to discuss your use case to see if there are possible workarounds.

Sign in to add a comment