Set SpanKind for servlet requests
MODIFY
instrumentation/servlet/request-2/src/main/java/io/opentelemetry/auto/instrumentation/servlet2/Servlet2Advice.java
instrumentation/servlet/request-2/src/main/java/io/opentelemetry/auto/instrumentation/servlet2/Servlet2Advice.java
@@ -47,7 +47,8 @@ public class Servlet2Advice {
response = new StatusSavingHttpServletResponseWrapper((HttpServletResponse) response);
}
- final Span.Builder builder = TRACER.spanBuilder("servlet.request");
+ final Span.Builder builder =
+ TRACER.spanBuilder("servlet.request").setSpanKind(Span.Kind.SERVER);
try {
final SpanContext extractedContext =
TRACER.getHttpTextFormat().extract((HttpServletRequest) request, GETTER);

MODIFY
instrumentation/servlet/request-3/src/main/java/io/opentelemetry/auto/instrumentation/servlet3/Servlet3Advice.java
instrumentation/servlet/request-3/src/main/java/io/opentelemetry/auto/instrumentation/servlet3/Servlet3Advice.java
@@ -37,7 +37,8 @@ public class Servlet3Advice {
}
final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
- final Span.Builder builder = TRACER.spanBuilder("servlet.request");
+ final Span.Builder builder =
+ TRACER.spanBuilder("servlet.request").setSpanKind(Span.Kind.SERVER);
try {
final SpanContext extractedContext =
TRACER.getHttpTextFormat().extract((HttpServletRequest) request, GETTER);

Set SpanKind for servlet requests (#88)