By default report the db.type instead of the component for jdbc and databases

This commit is contained in:
Guillaume Polaert 2017-07-24 16:29:55 +02:00
parent a58f797fd1
commit 802fe8b65d
2 changed files with 2 additions and 13 deletions

View File

@ -12,12 +12,12 @@ public class DBComponent extends DDSpanContextDecorator {
public DBComponent() { public DBComponent() {
super(); super();
this.setMatchingTag(Tags.COMPONENT.getKey()); this.setMatchingTag(Tags.DB_TYPE.getKey());
this.setSetTag(DDTags.SERVICE_NAME); this.setSetTag(DDTags.SERVICE_NAME);
} }
@Override @Override
public boolean afterSetTag(DDSpanContext context, String tag, Object value) { public boolean afterSetTag(final DDSpanContext context, final String tag, final Object value) {
//Assign service name //Assign service name
if (super.afterSetTag(context, tag, value)) { if (super.afterSetTag(context, tag, value)) {
//Assign span type to DB //Assign span type to DB

View File

@ -5,17 +5,6 @@ decorators:
matchingValue: java-okhttp matchingValue: java-okhttp
setValue: http-client setValue: http-client
- type: DBComponent - type: DBComponent
matchingValue: java-mongo
setValue: mongo
- type: DBComponent
matchingValue: java-jdbc
setValue: jdbc
- type: DBComponent
matchingValue: java-cassandra
setValue: cassandra
- type: DBComponent
matchingValue: java-elasticsearch
setValue: elasticsearch
- type: HTTPComponent - type: HTTPComponent
matchingValue: java-aws-sdk matchingValue: java-aws-sdk
setValue: aws-client setValue: aws-client