File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/kotlin/no/nav/navansatt Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
package no.nav.navansatt
2
2
3
- import io.opentelemetry.api.GlobalOpenTelemetry
4
3
import kotlinx.coroutines.Dispatchers
5
4
import kotlinx.coroutines.withContext
6
5
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
9
7
import io.opentelemetry.instrumentation.annotations.WithSpan
10
8
import org.slf4j.LoggerFactory
11
9
import java.util.Hashtable
@@ -45,7 +43,7 @@ class ActiveDirectoryClient(
45
43
}
46
44
}
47
45
48
- @WithSpan
46
+ @WithSpan(kind = SpanKind . CLIENT )
49
47
suspend fun getUsers (idents : List <String >): List <User > = withContext(Dispatchers .IO ) {
50
48
val root = InitialLdapContext (env, null )
51
49
@@ -94,7 +92,7 @@ class ActiveDirectoryClient(
94
92
users
95
93
}
96
94
97
- @WithSpan
95
+ @WithSpan(kind = SpanKind . CLIENT )
98
96
suspend fun getUser (ident : String ): User ? = withContext(Dispatchers .IO ) {
99
97
val root = InitialLdapContext (env, null )
100
98
You can’t perform that action at this time.
0 commit comments