Updating decorators due the new behavior
MODIFY
dd-trace/src/main/java/com/datadoghq/trace/integration/DBComponent.java
dd-trace/src/main/java/com/datadoghq/trace/integration/DBComponent.java
@@ -2,7 +2,6 @@ package com.datadoghq.trace.integration;
import com.datadoghq.trace.DDSpanContext;
import com.datadoghq.trace.DDTags;
-
import io.opentracing.tag.Tags;
/**
@@ -25,9 +24,7 @@ public class DBComponent extends DDSpanContextDecorator {
context.setSpanType("db");
//Assign resource name
- if(tag.equals(Tags.DB_STATEMENT.getKey())){
context.setResourceName(String.valueOf(value));
- }
return true;
}
return false;

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/integration/DDSpanContextDecorator.java
dd-trace/src/main/java/com/datadoghq/trace/integration/DDSpanContextDecorator.java
@@ -16,7 +16,7 @@ public abstract class DDSpanContextDecorator {
private String setValue;
public boolean afterSetTag(DDSpanContext context, String tag, Object value) {
- if(tag.equals(this.getMatchingTag()) && (this.getMatchingValue()==null || value.equals(this.getMatchingValue()))){
+ if ((this.getMatchingValue() == null || value.equals(this.getMatchingValue()))) {
String targetTag = getSetTag() == null ? tag : getSetTag();
String targetValue = getSetValue() == null ? String.valueOf(value) : getSetTag();
context.setTag(targetTag, targetValue);

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/integration/HTTPComponent.java
dd-trace/src/main/java/com/datadoghq/trace/integration/HTTPComponent.java
@@ -2,7 +2,6 @@ package com.datadoghq.trace.integration;
import com.datadoghq.trace.DDSpanContext;
import com.datadoghq.trace.DDTags;
-
import io.opentracing.tag.Tags;
@@ -22,6 +21,7 @@ public class HTTPComponent extends DDSpanContextDecorator {
public boolean afterSetTag(DDSpanContext context, String tag, Object value) {
//Assign service name
if (super.afterSetTag(context, tag, value)) {
+
//Assign span type to WEB
context.setSpanType("web");
return true;

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/integration/URLAsResourceName.java
dd-trace/src/main/java/com/datadoghq/trace/integration/URLAsResourceName.java
package com.datadoghq.trace.integration;
-import java.net.MalformedURLException;
-
import com.datadoghq.trace.DDSpanContext;
import com.datadoghq.trace.DDTags;
-
import io.opentracing.tag.Tags;
+import java.net.MalformedURLException;
+
public class URLAsResourceName extends DDSpanContextDecorator {
public URLAsResourceName() {
@@ -18,7 +17,6 @@ public class URLAsResourceName extends DDSpanContextDecorator {
@Override
public boolean afterSetTag(DDSpanContext context, String tag, Object value) {
//Assign resource name
- if(tag.equals(Tags.HTTP_URL.getKey())){
try {
String path = new java.net.URL(String.valueOf(value)).getPath();
context.setTag(this.getSetTag(), path);
@@ -26,9 +24,6 @@ public class URLAsResourceName extends DDSpanContextDecorator {
context.setResourceName(String.valueOf(value));
}
return true;
- }else{
- return false;
- }
}
}

Updating decorators due the new behavior