fix the operation name

This commit is contained in:
Guillaume Polaert 2017-07-28 09:09:19 +02:00
parent f20ed93741
commit e830e1b7e6
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -8,5 +8,5 @@ decorators:
- type: HTTPComponent
matchingValue: java-aws-sdk
setValue: aws-client
- type: DBStatementAsResourceName
# - type: DBStatementAsResourceName
- type: ErrorFlag