Skip to content

UrlSessionInstrumentation not in place when using Ktor Client with Darwin engine #978

@marcorighini

Description

@marcorighini

In multiplatform mobile projects the network stack is typically based on Ktor Client with Darwin Engine https://ktor.io/docs/client-engines.html#darwin

When using this engine the network instrumentation is not applied.

This is probably related to method swizzling applied to methods that are not effectively the ones used by the Darwin Engine.

Source code is here https://github.com/ktorio/ktor/tree/main/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin

Note: other SDKs seem to use NSURLSessionConfiguration for hooking into network calls. Would it be a feasible alternative approach to method swizzling?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions