Skip to content

Commit f7de324

Browse files
committed
Add SpanKind
1 parent 12ac8c4 commit f7de324

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/kotlin/no/nav/navansatt/ActiveDirectoryClient.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package no.nav.navansatt
22

3-
import io.opentelemetry.api.GlobalOpenTelemetry
43
import kotlinx.coroutines.Dispatchers
54
import kotlinx.coroutines.withContext
65
import org.apache.commons.text.StringEscapeUtils
7-
import io.opentelemetry.api.OpenTelemetry;
8-
import io.opentelemetry.api.trace.Tracer;
6+
import io.opentelemetry.api.trace.SpanKind
97
import io.opentelemetry.instrumentation.annotations.WithSpan
108
import org.slf4j.LoggerFactory
119
import java.util.Hashtable
@@ -45,7 +43,7 @@ class ActiveDirectoryClient(
4543
}
4644
}
4745

48-
@WithSpan
46+
@WithSpan(kind = SpanKind.CLIENT)
4947
suspend fun getUsers(idents: List<String>): List<User> = withContext(Dispatchers.IO) {
5048
val root = InitialLdapContext(env, null)
5149

@@ -94,7 +92,7 @@ class ActiveDirectoryClient(
9492
users
9593
}
9694

97-
@WithSpan
95+
@WithSpan(kind = SpanKind.CLIENT)
9896
suspend fun getUser(ident: String): User? = withContext(Dispatchers.IO) {
9997
val root = InitialLdapContext(env, null)
10098

0 commit comments

Comments
 (0)