Open moyerr opened 1 year ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @moyerr, I tried to reproduce the issue using the code snippet you shared, but I'm able to see my network requests in the console. Could you provide an MCVE or complete code snippet that reproduces the issue?
Hey @moyerr. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@moyerr if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
I am seeing the same issue, but it appears to be iOS version specific.
-FIRDebugEnabled
is used.public func data(for request: URLRequest) async throws -> (Data, URLResponse)
10.16.0 - [FirebasePerformance][I-PRF100009] Logging network request trace - {url}, Response code: 200, 928.3030ms
I am able to see logs for requests made using the completionHandler based URLSession functions across all iOS versions without any issues
public func dataTask(with request: URLRequest, completionHandler: @escaping CompletionHandler) -> URLSessionDataTask
Firebase version:
Xcode version:
Hey I was just checking out some things in the pics I took last night of someone’s phone. Can you guys tell me what’s going on ? If it’s what I’m thinking I need confirmation that I’m either wrong or right.BrooksieOn Oct 18, 2023, at 12:57 PM, Morgan Chen @.***> wrote: Reopened #11861.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
BrooksieOn Oct 18, 2023, at 1:09 PM, Rachel McBride @.> wrote:Hey I was just checking out some things in the pics I took last night of someone’s phone. Can you guys tell me what’s going on ? If it’s what I’m thinking I need confirmation that I’m either wrong or right.BrooksieOn Oct 18, 2023, at 12:57 PM, Morgan Chen @.> wrote: Reopened #11861.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Is it possible that the method swizzling isn't attaching to the async variant of URLSession and thus it isn't instrumenting it?
You could write an extension on URLSession that wrappers the async call and creates an HTTPMetric. Automatically start before making the call, and stop on response or throws. To prevent double reporting disable the instrumentation. The downside of this is you don't get the app lifecycle traces then--such as _app_start. Presently that 100% internal and a developer cannot replicate it because of lack of public initializers on the FIRTrace and inability to set custom start/stop times.
I don't want any method swizzling going on for this exact kind of reason and want to be 100% in control of the network traces. https://github.com/firebase/firebase-ios-sdk/issues/12177
I can confirm I have reliably been able to reproduce this issue even on the latest version.
Description
I noticed that my app's network requests were not showing up at all in Performance Monitoring. I traced the issue to the fact that I am using
URLSession
's concurrency (async/await) APIs.I can tell everything is set up properly because I can see the network traces when I use URLSession's closure-based APIs.
Reproducing the issue
Firebase SDK Version
10.15.0
Xcode Version
14.3.1
Installation Method
Swift Package Manager
Firebase Product(s)
Performance
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
No response