URLSessionInstrumentation blocking calls
Hi,
I've integrated the SDK in my Swift project.
func setupElasticApm() {
let config = AgentConfigBuilder()
.withServerUrl(myUrl)
.withSecretToken(myToken)
.useConnectionType(.http)
.build()
let instrumentationConfig = InstrumentationConfigBuilder()
.withURLSessionInstrumentation(false) --> this makes a difference
.build()
ElasticApmAgent
.start(with: config, instrumentationConfig)
}
Almost all is working just fine. Only issue I'm experiencing si with the URLSessionInstrumentation: it looks like its intercepting the networking requests my app is starting but it is also blocking them and they don't complete.
Some background info:
- our networking requests are defined using OpenAPI Generator for Swift, version 4.3.1 (I know, old one)
- the generated library uses Alamofire version 4.9.1 (I know, old one)
I was not able to debug it properly and get to the bottom of the issue but I've got the feeling that when multiple network requests are executed ad the same time some can be cancelled/lost somehow. I can see calls get started and I never reach the completion block of the request.
It doesn't happen if I add .withURLSessionInstrumentation(false) and it never happened before.
Is there anything you can suggest?
Kind regards, Alessandro