이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

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 to dd-sdk-kotlin-multiplatform-ktor if you’re using Ktor 2.x, or dd-sdk-kotlin-multiplatform-ktor3 for Ktor 3.x:
kotlin {
    // ...
    sourceSets {
        // ...
        commonMain.dependencies {
            // Use this line if you are using Ktor 2.x
            implementation("com.datadoghq:dd-sdk-kotlin-multiplatform-ktor:x.x.x")
            // Use this line if you are using Ktor 3.x
            // implementation("com.datadoghq:dd-sdk-kotlin-multiplatform-ktor3: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)
            ),
            traceSampleRate = 100f
        )
    )
}

Further Reading

추가 유용한 문서, 링크 및 기사: