This page lists integrated libraries you can use for Kotlin Multiplatform applications.

Ktor

If you use Ktor to make network requests in your application, you can integrate the Datadog Ktor plugin to collect RUM information about them:

  1. Install the Datadog Kotlin Multiplatform SDK and enable RUM.
  2. Add a common dependency on dd-sdk-kotlin-multiplatform-ktor:
kotlin {
    // ...
    sourceSets {
        // ...
        commonMain.dependencies {
            implementation("com.datadoghq:dd-sdk-kotlin-multiplatform-ktor:x.x.x")
        }
    }
}
  1. Add the provided Datadog Ktor Plugin to your Ktor HttpClient:
val ktorClient = HttpClient {
    install(
        datadogKtorPlugin(
            tracedHosts = mapOf(
                "example.com" to setOf(TracingHeaderType.DATADOG),
                "example.eu" to setOf(TracingHeaderType.DATADOG)
            ),
            traceSamplingRate = 100f
        )
    )
}

Further Reading