http servers
MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
@@ -89,7 +89,7 @@ class LagomTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "ws://localhost:${server.port()}/echo"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
}
}
@@ -127,7 +127,7 @@ class LagomTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "ws://localhost:${server.port()}/error"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
"$Tags.ERROR.key" true
}

MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/main/scala/datadog/trace/instrumentation/akkahttp/AkkaHttpServerInstrumentation.java
dd-java-agent/instrumentation/akka-http-10.0/src/main/scala/datadog/trace/instrumentation/akkahttp/AkkaHttpServerInstrumentation.java
@@ -110,7 +110,7 @@ public final class AkkaHttpServerInstrumentation extends Instrumenter.Default {
.asChildOf(extractedContext)
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER)
.withTag(Tags.HTTP_METHOD.getKey(), request.method().value())
- .withTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET)
+ .withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER)
.withTag(Tags.COMPONENT.getKey(), "akka-http-server")
.withTag(Tags.HTTP_URL.getKey(), request.getUri().toString())
.startActive(false);

MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpServerInstrumentationTest.groovy
dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpServerInstrumentationTest.groovy
@@ -52,6 +52,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /test"
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
defaultTags()
@@ -59,7 +60,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "http://localhost:$port/test"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
}
}
@@ -94,6 +95,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /$endpoint"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -101,7 +103,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "http://localhost:$port/$endpoint"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
errorTags RuntimeException, errorMessage
}
@@ -134,6 +136,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /server-error"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -141,7 +144,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "http://localhost:$port/server-error"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
"$Tags.ERROR.key" true
}
@@ -173,6 +176,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "404"
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
defaultTags()
@@ -180,7 +184,7 @@ class AkkaHttpServerInstrumentationTest extends AgentTestRunner {
"$Tags.HTTP_URL.key" "http://localhost:$port/not-found"
"$Tags.HTTP_METHOD.key" "GET"
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
"$Tags.COMPONENT.key" "akka-http-server"
}
}

MODIFY
dd-java-agent/instrumentation/jetty-8/src/main/java/datadog/trace/instrumentation/jetty8/JettyHandlerAdvice.java
dd-java-agent/instrumentation/jetty-8/src/main/java/datadog/trace/instrumentation/jetty8/JettyHandlerAdvice.java
@@ -37,7 +37,7 @@ public class JettyHandlerAdvice {
.buildSpan("jetty.request")
.asChildOf(extractedContext)
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER)
- .withTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET)
+ .withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER)
.withTag("servlet.context", req.getContextPath())
.withTag("span.origin.type", source.getClass().getName())
.startActive(false);

MODIFY
dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy
dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy
@@ -64,14 +64,14 @@ class JettyHandlerTest extends AgentTestRunner {
context.serviceName == "unnamed-java-app"
context.operationName == "jetty.request"
context.resourceName == "GET ${handler.class.name}"
- context.spanType == DDSpanTypes.WEB_SERVLET
+ context.spanType == DDSpanTypes.HTTP_SERVER
!context.getErrorFlag()
context.parentId == "0"
def tags = context.tags
tags["http.url"] == "http://localhost:$port/"
tags["http.method"] == "GET"
tags["span.kind"] == "server"
- tags["span.type"] == "web"
+ tags["span.type"] == DDSpanTypes.HTTP_SERVER
tags["component"] == "jetty-handler"
tags["http.status_code"] == 200
tags["thread.name"] != null
@@ -152,14 +152,14 @@ class JettyHandlerTest extends AgentTestRunner {
context.serviceName == "unnamed-java-app"
context.operationName == "jetty.request"
context.resourceName == "GET ${handler.class.name}"
- context.spanType == DDSpanTypes.WEB_SERVLET
+ context.spanType == DDSpanTypes.HTTP_SERVER
context.getErrorFlag()
context.parentId == "0"
def tags = context.tags
tags["http.url"] == "http://localhost:$port/"
tags["http.method"] == "GET"
tags["span.kind"] == "server"
- tags["span.type"] == "web"
+ tags["span.type"] == DDSpanTypes.HTTP_SERVER
tags["component"] == "jetty-handler"
tags["http.status_code"] == 500
tags["thread.name"] != null

MODIFY
dd-java-agent/instrumentation/netty-4.0/src/main/java/datadog/trace/instrumentation/netty40/server/HttpServerRequestTracingHandler.java
dd-java-agent/instrumentation/netty-4.0/src/main/java/datadog/trace/instrumentation/netty40/server/HttpServerRequestTracingHandler.java
@@ -47,7 +47,7 @@ public class HttpServerRequestTracingHandler extends ChannelInboundHandlerAdapte
.withTag(Tags.HTTP_METHOD.getKey(), request.getMethod().name())
.withTag(Tags.HTTP_URL.getKey(), url)
.withTag(Tags.COMPONENT.getKey(), "netty")
- .withTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET)
+ .withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER)
.startActive(false);
if (scope instanceof TraceScope) {

MODIFY
dd-java-agent/instrumentation/netty-4.0/src/test/groovy/Netty40ServerTest.groovy
dd-java-agent/instrumentation/netty-4.0/src/test/groovy/Netty40ServerTest.groovy
@@ -57,7 +57,7 @@ class Netty40ServerTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "netty.request"
resourceName "GET /"
- spanType DDSpanTypes.WEB_SERVLET
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
"$Tags.COMPONENT.key" "netty"
@@ -67,7 +67,7 @@ class Netty40ServerTest extends AgentTestRunner {
"$Tags.PEER_HOSTNAME.key" "localhost"
"$Tags.PEER_PORT.key" Integer
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
defaultTags()
}
}
@@ -103,7 +103,7 @@ class Netty40ServerTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "netty.request"
resourceName name
- spanType DDSpanTypes.WEB_SERVLET
+ spanType DDSpanTypes.HTTP_SERVER
errored error
tags {
"$Tags.COMPONENT.key" "netty"
@@ -113,7 +113,7 @@ class Netty40ServerTest extends AgentTestRunner {
"$Tags.PEER_HOSTNAME.key" "localhost"
"$Tags.PEER_PORT.key" Integer
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
if (error) {
tag("error", true)
}

MODIFY
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/server/HttpServerRequestTracingHandler.java
dd-java-agent/instrumentation/netty-4.1/src/main/java/datadog/trace/instrumentation/netty41/server/HttpServerRequestTracingHandler.java
@@ -47,7 +47,7 @@ public class HttpServerRequestTracingHandler extends ChannelInboundHandlerAdapte
.withTag(Tags.HTTP_METHOD.getKey(), request.method().name())
.withTag(Tags.HTTP_URL.getKey(), url)
.withTag(Tags.COMPONENT.getKey(), "netty")
- .withTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET)
+ .withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER)
.startActive(false);
if (scope instanceof TraceScope) {

MODIFY
dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ServerTest.groovy
dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ServerTest.groovy
@@ -57,7 +57,7 @@ class Netty41ServerTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "netty.request"
resourceName "GET /"
- spanType DDSpanTypes.WEB_SERVLET
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
"$Tags.COMPONENT.key" "netty"
@@ -67,7 +67,7 @@ class Netty41ServerTest extends AgentTestRunner {
"$Tags.PEER_HOSTNAME.key" "localhost"
"$Tags.PEER_PORT.key" Integer
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
defaultTags()
}
}
@@ -103,7 +103,7 @@ class Netty41ServerTest extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "netty.request"
resourceName name
- spanType DDSpanTypes.WEB_SERVLET
+ spanType DDSpanTypes.HTTP_SERVER
errored error
tags {
"$Tags.COMPONENT.key" "netty"
@@ -113,7 +113,7 @@ class Netty41ServerTest extends AgentTestRunner {
"$Tags.PEER_HOSTNAME.key" "localhost"
"$Tags.PEER_PORT.key" Integer
"$Tags.SPAN_KIND.key" Tags.SPAN_KIND_SERVER
- "$DDTags.SPAN_TYPE" DDSpanTypes.WEB_SERVLET
+ "$DDTags.SPAN_TYPE" DDSpanTypes.HTTP_SERVER
if (error) {
tag("error", true)
}

MODIFY
dd-java-agent/instrumentation/play-2.4/src/latestDepTest/groovy/Play26Test.groovy
dd-java-agent/instrumentation/play-2.4/src/latestDepTest/groovy/Play26Test.groovy
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
+import datadog.trace.api.DDSpanTypes
import okhttp3.OkHttpClient
import okhttp3.Request
import play.api.test.TestServer
@@ -50,6 +51,7 @@ class Play26Test extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /helloplay/:from"
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
defaultTags()
@@ -57,7 +59,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "http://localhost:$port/helloplay/spock"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "akka-http-server"
}
}
@@ -65,13 +67,14 @@ class Play26Test extends AgentTestRunner {
childOf span(0)
operationName "play.request"
resourceName "GET /helloplay/:from"
+ spanType DDSpanTypes.HTTP_SERVER
tags {
defaultTags()
"http.status_code" 200
"http.url" "/helloplay/:from"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "play-action"
}
}
@@ -100,6 +103,7 @@ class Play26Test extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /make-error"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -107,7 +111,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "http://localhost:$port/make-error"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "akka-http-server"
"error" true
}
@@ -116,6 +120,7 @@ class Play26Test extends AgentTestRunner {
childOf span(0)
operationName "play.request"
resourceName "GET /make-error"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -123,7 +128,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "/make-error"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "play-action"
"error" true
}
@@ -150,6 +155,7 @@ class Play26Test extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "GET /exception"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -157,7 +163,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "http://localhost:$port/exception"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "akka-http-server"
"error" true
}
@@ -166,6 +172,7 @@ class Play26Test extends AgentTestRunner {
childOf span(0)
operationName "play.request"
resourceName "GET /exception"
+ spanType DDSpanTypes.HTTP_SERVER
errored true
tags {
defaultTags()
@@ -173,7 +180,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "/exception"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "play-action"
"error" true
"error.msg" "oh no"
@@ -203,6 +210,7 @@ class Play26Test extends AgentTestRunner {
serviceName "unnamed-java-app"
operationName "akka-http.request"
resourceName "404"
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
defaultTags()
@@ -210,7 +218,7 @@ class Play26Test extends AgentTestRunner {
"http.url" "http://localhost:$port/nowhere"
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "akka-http-server"
}
}
@@ -218,13 +226,14 @@ class Play26Test extends AgentTestRunner {
childOf span(0)
operationName "play.request"
resourceName "404"
+ spanType DDSpanTypes.HTTP_SERVER
errored false
tags {
defaultTags()
"http.status_code" 404
"http.method" "GET"
"span.kind" "server"
- "span.type" "web"
+ "span.type" DDSpanTypes.HTTP_SERVER
"component" "play-action"
}
}

MODIFY
dd-java-agent/instrumentation/play-2.4/src/main/java/datadog/trace/instrumentation/play/PlayInstrumentation.java
dd-java-agent/instrumentation/play-2.4/src/main/java/datadog/trace/instrumentation/play/PlayInstrumentation.java
@@ -128,7 +128,7 @@ public final class PlayInstrumentation extends Instrumenter.Default {
scope.span().setTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER);
scope.span().setTag(Tags.HTTP_METHOD.getKey(), req.method());
- scope.span().setTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET);
+ scope.span().setTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER);
scope.span().setTag(Tags.COMPONENT.getKey(), "play-action");
if (throwable == null) {

MODIFY
dd-java-agent/instrumentation/play-2.4/src/test/groovy/Play24Test.groovy
dd-java-agent/instrumentation/play-2.4/src/test/groovy/Play24Test.groovy
import datadog.opentracing.DDSpan
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
+import datadog.trace.api.DDSpanTypes
import okhttp3.OkHttpClient
import okhttp3.Request
import play.api.test.TestServer
@@ -51,6 +52,7 @@ class Play24Test extends AgentTestRunner {
root.serviceName == "unnamed-java-app"
root.operationName == "play.request"
root.resourceName == "GET /helloplay/:from"
+ root.spanType == DDSpanTypes.HTTP_SERVER
!root.context().getErrorFlag()
root.context().tags["http.status_code"] == 200
root.context().tags["http.url"] == "/helloplay/:from"
@@ -78,6 +80,7 @@ class Play24Test extends AgentTestRunner {
root.serviceName == "unnamed-java-app"
root.operationName == "play.request"
root.resourceName == "GET /make-error"
+ root.spanType == DDSpanTypes.HTTP_SERVER
root.context().getErrorFlag()
root.context().tags["http.status_code"] == 500
root.context().tags["http.url"] == "/make-error"
@@ -109,6 +112,7 @@ class Play24Test extends AgentTestRunner {
root.serviceName == "unnamed-java-app"
root.operationName == "play.request"
root.resourceName == "GET /exception"
+ root.spanType == DDSpanTypes.HTTP_SERVER
root.context().tags["http.status_code"] == 500
root.context().tags["http.url"] == "/exception"
root.context().tags["http.method"] == "GET"
@@ -135,6 +139,7 @@ class Play24Test extends AgentTestRunner {
root.serviceName == "unnamed-java-app"
root.operationName == "play.request"
root.resourceName == "404"
+ root.spanType == DDSpanTypes.HTTP_SERVER
!root.context().getErrorFlag()
root.context().tags["http.status_code"] == 404
root.context().tags["http.url"] == null

MODIFY
dd-java-agent/instrumentation/ratpack-1.4/src/main/java8/datadog/trace/instrumentation/ratpack/impl/TracingHandler.java
dd-java-agent/instrumentation/ratpack-1.4/src/main/java8/datadog/trace/instrumentation/ratpack/impl/TracingHandler.java
@@ -19,8 +19,8 @@ import ratpack.http.Status;
*/
public final class TracingHandler implements Handler {
@Override
- public void handle(Context ctx) {
- Request request = ctx.getRequest();
+ public void handle(final Context ctx) {
+ final Request request = ctx.getRequest();
final SpanContext extractedContext =
GlobalTracer.get()
@@ -32,7 +32,7 @@ public final class TracingHandler implements Handler {
.asChildOf(extractedContext)
.withTag(Tags.COMPONENT.getKey(), "handler")
.withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER)
- .withTag(DDTags.SPAN_TYPE, DDSpanTypes.WEB_SERVLET)
+ .withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_SERVER)
.withTag(Tags.HTTP_METHOD.getKey(), request.getMethod().getName())
.withTag(Tags.HTTP_URL.getKey(), request.getUri())
.startActive(true);
@@ -40,9 +40,9 @@ public final class TracingHandler implements Handler {
ctx.getResponse()
.beforeSend(
response -> {
- Span span = scope.span();
+ final Span span = scope.span();
span.setTag(DDTags.RESOURCE_NAME, getResourceName(ctx));
- Status status = response.getStatus();
+ final Status status = response.getStatus();
if (status != null) {
if (status.is5xx()) {
Tags.ERROR.set(span, true);
@@ -55,7 +55,7 @@ public final class TracingHandler implements Handler {
ctx.next();
}
- private static String getResourceName(Context ctx) {
+ private static String getResourceName(final Context ctx) {
String description = ctx.getPathBinding().getDescription();
if (description == null || description.isEmpty()) {
description = ctx.getRequest().getUri();

MODIFY
dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackTest.groovy
dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackTest.groovy
@@ -52,7 +52,7 @@ class RatpackTest extends AgentTestRunner {
span.context().operationName == "ratpack.handler"
span.context().resourceName == "GET /"
span.context().tags["component"] == "handler"
- span.context().spanType == DDSpanTypes.WEB_SERVLET
+ span.context().spanType == DDSpanTypes.HTTP_SERVER
!span.context().getErrorFlag()
span.context().tags["http.url"] == "/"
span.context().tags["http.method"] == "GET"
@@ -92,7 +92,7 @@ class RatpackTest extends AgentTestRunner {
span.context().operationName == "ratpack.handler"
span.context().resourceName == "GET /:foo/:bar?/baz"
span.context().tags["component"] == "handler"
- span.context().spanType == DDSpanTypes.WEB_SERVLET
+ span.context().spanType == DDSpanTypes.HTTP_SERVER
!span.context().getErrorFlag()
span.context().tags["http.url"] == "/a/b/baz"
span.context().tags["http.method"] == "GET"
@@ -130,7 +130,7 @@ class RatpackTest extends AgentTestRunner {
span.context().operationName == "ratpack.handler"
span.context().resourceName == "GET /"
span.context().tags["component"] == "handler"
- span.context().spanType == DDSpanTypes.WEB_SERVLET
+ span.context().spanType == DDSpanTypes.HTTP_SERVER
span.context().tags["http.url"] == "/"
span.context().tags["http.method"] == "GET"
span.context().tags["span.kind"] == "server"
@@ -191,7 +191,7 @@ class RatpackTest extends AgentTestRunner {
span.context().operationName == "ratpack.handler"
span.context().resourceName == "GET /"
span.context().tags["component"] == "handler"
- span.context().spanType == DDSpanTypes.WEB_SERVLET
+ span.context().spanType == DDSpanTypes.HTTP_SERVER
!span.context().getErrorFlag()
span.context().tags["http.url"] == "/"
span.context().tags["http.method"] == "GET"
@@ -234,7 +234,7 @@ class RatpackTest extends AgentTestRunner {
nestedSpan.context().operationName == "ratpack.handler"
nestedSpan.context().resourceName == "GET /nested2"
nestedSpan.context().tags["component"] == "handler"
- nestedSpan.context().spanType == DDSpanTypes.WEB_SERVLET
+ nestedSpan.context().spanType == DDSpanTypes.HTTP_SERVER
!nestedSpan.context().getErrorFlag()
nestedSpan.context().tags["http.url"] == "/nested2"
nestedSpan.context().tags["http.method"] == "GET"
@@ -251,7 +251,7 @@ class RatpackTest extends AgentTestRunner {
nestedSpan2.context().operationName == "ratpack.handler"
nestedSpan2.context().resourceName == "GET /nested"
nestedSpan2.context().tags["component"] == "handler"
- nestedSpan2.context().spanType == DDSpanTypes.WEB_SERVLET
+ nestedSpan2.context().spanType == DDSpanTypes.HTTP_SERVER
!nestedSpan2.context().getErrorFlag()
nestedSpan2.context().tags["http.url"] == "/nested"
nestedSpan2.context().tags["http.method"] == "GET"

MODIFY
dd-java-agent/instrumentation/sparkjava-2.4/src/test/groovy/SparkJavaBasedTest.groovy
dd-java-agent/instrumentation/sparkjava-2.4/src/test/groovy/SparkJavaBasedTest.groovy
@@ -79,14 +79,14 @@ class SparkJavaBasedTest extends AgentTestRunner {
context.serviceName == "unnamed-java-app"
context.operationName == "jetty.request"
context.resourceName == "GET /param/:param"
- context.spanType == DDSpanTypes.WEB_SERVLET
+ context.spanType == DDSpanTypes.HTTP_SERVER
!context.getErrorFlag()
context.parentId == "0"
def tags = context.tags
tags["http.url"] == "http://localhost:$port/param/asdf1234"
tags["http.method"] == "GET"
tags["span.kind"] == "server"
- tags["span.type"] == "web"
+ tags["span.type"] == DDSpanTypes.HTTP_SERVER
tags["component"] == "jetty-handler"
tags["http.status_code"] == 200
tags["thread.name"] != null

http servers