fix the operation name
MODIFY
dd-java-agent/src/main/java/com/datadoghq/trace/agent/integration/MongoHelper.java
dd-java-agent/src/main/java/com/datadoghq/trace/agent/integration/MongoHelper.java
@@ -50,9 +50,11 @@ public class MongoHelper extends DDAgentTracingHelper<MongoClientOptions.Builder
try {
final BsonDocument normalized = new BsonDocument();
norm(event.getCommand(), normalized);
- span.setTag(DDTags.RESOURCE_NAME, normalized.toJson());
+ span.setTag(DDTags.RESOURCE_NAME, normalized.toString());
+ span.setOperationName("mongo.cmd");
+
} catch (final Throwable e) {
- log.warn("Couldn't the mongo query: " + e.getMessage(), e);
+ log.warn("Couldn't decorate the mongo query: " + e.getMessage(), e);
}
}

MODIFY
dd-trace/src/main/resources/dd-trace-decorators.yaml
dd-trace/src/main/resources/dd-trace-decorators.yaml
@@ -8,5 +8,5 @@ decorators:
- type: HTTPComponent
matchingValue: java-aws-sdk
setValue: aws-client
- - type: DBStatementAsResourceName
+# - type: DBStatementAsResourceName
- type: ErrorFlag

fix the operation name