some stuff needed
MODIFY
dd-trace-examples/rest-spark/rest-spark.gradle
dd-trace-examples/rest-spark/rest-spark.gradle
@@ -16,4 +16,8 @@ dependencies {
compile 'io.opentracing:opentracing-api:0.30.0'
compile 'io.opentracing:opentracing-util:0.30.0'
compile 'io.opentracing.contrib:opentracing-mongo-driver:0.0.2'
+ compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
+ compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
+
+
}

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/DDBaseSpan.java
dd-trace/src/main/java/com/datadoghq/trace/DDBaseSpan.java
@@ -4,12 +4,13 @@ import com.datadoghq.trace.util.Clock;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.opentracing.BaseSpan;
+import lombok.extern.slf4j.Slf4j;
+
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
-import lombok.extern.slf4j.Slf4j;
@Slf4j
public abstract class DDBaseSpan<S extends BaseSpan> implements BaseSpan<S> {

MODIFY
dd-trace/src/main/java/com/datadoghq/trace/integration/DBStatementAsResourceName.java
dd-trace/src/main/java/com/datadoghq/trace/integration/DBStatementAsResourceName.java
@@ -10,4 +10,39 @@ public class DBStatementAsResourceName extends DDSpanContextDecorator {
this.setMatchingTag(Tags.DB_STATEMENT.getKey());
this.setSetTag(DDTags.RESOURCE_NAME);
}
+
+ //{ "insert" : "calls", "ordered" : true, "documents" : [{ "_id" : { "$oid" : "5979bbb0ed6fed5749cc9e7c" }, "name" : "MongoDB", "type" : "database", "identifier" : "10", "versions" : ["v3.2", "v3.0", "v2.6"], "info" : { "x" : 203, "y" : 102 } }] }
+ private void normalizeFilter(final Object f) {
+
+
}
+}
+
+ /*
+def normalize_filter(f=None):
+ if f is None:
+ return {}
+ elif isinstance(f, list):
+ # normalize lists of filters
+ # e.g. {$or: [ { age: { $lt: 30 } }, { type: 1 } ]}
+ return [normalize_filter(s) for s in f]
+ elif isinstance(f, dict):
+ # normalize dicts of filters
+ # {$or: [ { age: { $lt: 30 } }, { type: 1 } ]})
+ out = {}
+ for k, v in iteritems(f):
+ if k == "$in" or k == "$nin":
+ # special case $in queries so we don't loop over lists.
+ out[k] = "?"
+ elif isinstance(v, list) or isinstance(v, dict):
+ # RECURSION ALERT: needs to move to the agent
+ out[k] = normalize_filter(v)
+ else:
+ # NOTE: this shouldn't happen, but let's have a safeguard.
+ out[k] = '?'
+ return out
+ else:
+ # FIXME[matt] unexpected type. not sure this should ever happen, but at
+ # least it won't crash.
+ return {}*/
+

some stuff needed