diff --git a/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java b/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java index f4b118130c6..e8942d003e7 100644 --- a/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java +++ b/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java @@ -73,7 +73,7 @@ public abstract class HttpServerDecorator result) { if (result.isFailure()) { DECORATE.onError(span, result.failed().get()); } else { + Result response = result.get(); if (REPORT_HTTP_STATUS) { - DECORATE.onResponse(span, result.get()); + DECORATE.onResponse(span, response); + } else { + DECORATE.updateOn404Only(span, response); } } DECORATE.beforeFinish(span); diff --git a/dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java b/dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java index 5b534dff790..53697ca8351 100644 --- a/dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java +++ b/dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java @@ -428,6 +428,16 @@ public byte getResourceNamePriority() { } public void setResourceName(final CharSequence resourceName, byte priority) { + if (log.isDebugEnabled()) { + log.debug( + "setResourceName `{}`->`{}` with priority {}->{} for traceId={} spanId={}", + this.resourceName, + resourceName, + resourceNamePriority, + priority, + traceId, + spanId); + } if (null == resourceName) { return; } diff --git a/gradle/java_no_deps.gradle b/gradle/java_no_deps.gradle index 16a57001e1c..e1e9e39f3d8 100644 --- a/gradle/java_no_deps.gradle +++ b/gradle/java_no_deps.gradle @@ -307,16 +307,20 @@ def isJavaVersionAllowedForProperty(JavaVersion version, String propertyPrefix = def definedMin = project.hasProperty(minProp) def definedMax = project.hasProperty(maxProp) if (definedMin && project.getProperty(minProp).compareTo(version) > 0) { + logger.info("isJavaVersionAllowedForProperty is false b/o minProp=${minProp} is defined and greater than version=${version}") return false } //default to the general min if defined and specific one is was not defined if (!propertyPrefix.isEmpty() && !definedMin && project.hasProperty('minJavaVersionForTests') && project.getProperty('minJavaVersionForTests').compareTo(version) > 0) { + logger.info("isJavaVersionAllowedForProperty is false b/o minJavaVersionForTests=${project.getProperty('minJavaVersionForTests')} is defined and greater than version=${version}") return false } if (definedMax && project.getProperty(maxProp).compareTo(version) < 0) { + logger.info("isJavaVersionAllowedForProperty is false b/o maxProp=${project.getProperty(maxProp)} is defined and lower than version=${version}") return false } if (!propertyPrefix.isEmpty() && !definedMax && project.hasProperty('maxJavaVersionForTests') && project.getProperty('maxJavaVersionForTests').compareTo(version) < 0) { + logger.info("isJavaVersionAllowedForProperty is false b/o maxJavaVersionForTests=${project.getProperty('maxJavaVersionForTests')} is defined and lower than version=${version}") return false } return true