File tree 2 files changed +4
-5
lines changed
instrumentation/gwt-2.0/javaagent/src
main/java/io/opentelemetry/javaagent/instrumentation/gwt
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
import io .opentelemetry .api .GlobalOpenTelemetry ;
9
9
import io .opentelemetry .context .ContextKey ;
10
10
import io .opentelemetry .instrumentation .api .instrumenter .Instrumenter ;
11
+ import io .opentelemetry .instrumentation .api .instrumenter .SpanKindExtractor ;
11
12
import io .opentelemetry .instrumentation .api .instrumenter .rpc .RpcServerAttributesExtractor ;
12
13
import io .opentelemetry .instrumentation .api .instrumenter .rpc .RpcSpanNameExtractor ;
13
14
import java .lang .reflect .Method ;
@@ -29,9 +30,7 @@ public final class GwtSingletons {
29
30
INSTRUMENTATION_NAME ,
30
31
RpcSpanNameExtractor .create (rpcAttributesGetter ))
31
32
.addAttributesExtractor (RpcServerAttributesExtractor .create (rpcAttributesGetter ))
32
- // TODO(anuraaga): This should be a server span, but we currently have no way to merge
33
- // with the HTTP instrumentation's server span.
34
- .buildInstrumenter ();
33
+ .buildInstrumenter (SpanKindExtractor .alwaysServer ());
35
34
}
36
35
37
36
public static Instrumenter <Method , Void > instrumenter () {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes
123
123
serverSpan(it, 0 , getContextPath() + " /greeting/greet" )
124
124
span(1 ) {
125
125
name " test.gwt.shared.MessageService/sendMessage"
126
- kind SpanKind . INTERNAL
126
+ kind SpanKind . SERVER
127
127
childOf(span(0 ))
128
128
attributes {
129
129
" $SemanticAttributes . RPC_SYSTEM " " gwt"
@@ -147,7 +147,7 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes
147
147
serverSpan(it, 0 , getContextPath() + " /greeting/greet" )
148
148
span(1 ) {
149
149
name " test.gwt.shared.MessageService/sendMessage"
150
- kind SpanKind . INTERNAL
150
+ kind SpanKind . SERVER
151
151
childOf(span(0 ))
152
152
errorEvent(IOException )
153
153
attributes {
You can’t perform that action at this time.
0 commit comments