diff --git a/dd-java-agent/instrumentation/liberty-20/src/main/java/datadog/trace/instrumentation/liberty20/LibertyDecorator.java b/dd-java-agent/instrumentation/liberty-20/src/main/java/datadog/trace/instrumentation/liberty20/LibertyDecorator.java index bcbc1c42c16..585a35332b0 100644 --- a/dd-java-agent/instrumentation/liberty-20/src/main/java/datadog/trace/instrumentation/liberty20/LibertyDecorator.java +++ b/dd-java-agent/instrumentation/liberty-20/src/main/java/datadog/trace/instrumentation/liberty20/LibertyDecorator.java @@ -100,7 +100,7 @@ public AgentSpan onResponseStatus(AgentSpan span, int status) { // we may have the status during response blocking, but in that case // the status code is not propagated to the servlet layer if (currentStatus == null || !span.isError()) { - span.setHttpStatusCode(status); + super.onResponseStatus(span, status); } return span; } diff --git a/dd-java-agent/instrumentation/liberty-20/src/test/groovy/datadog/trace/instrumentation/liberty20/Liberty20Test.groovy b/dd-java-agent/instrumentation/liberty-20/src/test/groovy/datadog/trace/instrumentation/liberty20/Liberty20Test.groovy index 56c3ca15dc0..937b0b82c17 100644 --- a/dd-java-agent/instrumentation/liberty-20/src/test/groovy/datadog/trace/instrumentation/liberty20/Liberty20Test.groovy +++ b/dd-java-agent/instrumentation/liberty-20/src/test/groovy/datadog/trace/instrumentation/liberty20/Liberty20Test.groovy @@ -127,15 +127,6 @@ abstract class Liberty20Test extends HttpServerTest { true } - @Override - String expectedResourceName(ServerEndpoint endpoint, String method, URI address) { - if (endpoint.path == '/not-found') { - 'GET /testapp/not-found' - } else { - super.expectedResourceName(endpoint, method, address) - } - } - def 'test blocking on response with commit during the response'() { setup: assumeTrue(testBlockingOnResponse()) diff --git a/dd-java-agent/instrumentation/liberty-23/src/main/java/datadog/trace/instrumentation/liberty23/LibertyDecorator.java b/dd-java-agent/instrumentation/liberty-23/src/main/java/datadog/trace/instrumentation/liberty23/LibertyDecorator.java index 633e1952dc7..b65461d0556 100644 --- a/dd-java-agent/instrumentation/liberty-23/src/main/java/datadog/trace/instrumentation/liberty23/LibertyDecorator.java +++ b/dd-java-agent/instrumentation/liberty-23/src/main/java/datadog/trace/instrumentation/liberty23/LibertyDecorator.java @@ -100,7 +100,7 @@ public AgentSpan onResponseStatus(AgentSpan span, int status) { // we may have the status during response blocking, but in that case // the status code is not propagated to the servlet layer if (currentStatus == null || !span.isError()) { - span.setHttpStatusCode(status); + super.onResponseStatus(span, status); } return span; } diff --git a/dd-java-agent/instrumentation/liberty-23/src/test/groovy/datadog/trace/instrumentation/liberty23/Liberty23Test.groovy b/dd-java-agent/instrumentation/liberty-23/src/test/groovy/datadog/trace/instrumentation/liberty23/Liberty23Test.groovy index 805e2dcfe97..42c3372008f 100644 --- a/dd-java-agent/instrumentation/liberty-23/src/test/groovy/datadog/trace/instrumentation/liberty23/Liberty23Test.groovy +++ b/dd-java-agent/instrumentation/liberty-23/src/test/groovy/datadog/trace/instrumentation/liberty23/Liberty23Test.groovy @@ -117,15 +117,6 @@ abstract class Liberty23Test extends HttpServerTest { true } - @Override - String expectedResourceName(ServerEndpoint endpoint, String method, URI address) { - if (endpoint.path == '/not-found') { - 'GET /testapp/not-found' - } else { - super.expectedResourceName(endpoint, method, address) - } - } - def 'test blocking on response with commit during the response'() { setup: assumeTrue(testBlockingOnResponse())