Skip to content

Commit

Permalink
Fix ktor-2.0 instrumentation name
Browse files Browse the repository at this point in the history
  • Loading branch information
mingchuno committed Aug 10, 2022
1 parent 1330553 commit f306798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f306798

Please sign in to comment.