Fix ktor-2.0 instrumentation name
MODIFY
instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/KtorNetServerAttributesGetter.kt
instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/KtorNetServerAttributesGetter.kt
@@ -20,7 +20,7 @@ internal class KtorNetServerAttributesGetter : NetServerAttributesGetter<Applica
}
override fun peerIp(request: ApplicationRequest): String? {
- var remote = request.local.remoteHost
+ val remote = request.local.remoteHost
if (remote != null && "unknown" != remote && isIpAddress(remote)) {
return remote
}

MODIFY
instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/KtorServerTracing.kt
instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/KtorServerTracing.kt
@@ -77,7 +77,7 @@ class KtorServerTracing private constructor(
}
companion object Feature : BaseApplicationPlugin<Application, Configuration, KtorServerTracing> {
- private val INSTRUMENTATION_NAME = "io.opentelemetry.ktor-1.0"
+ private val INSTRUMENTATION_NAME = "io.opentelemetry.ktor-2.0"
private val contextKey = AttributeKey<Context>("OpenTelemetry")
private val errorKey = AttributeKey<Throwable>("OpenTelemetryException")

Fix ktor-2.0 instrumentation name (#6452)