By default report the db.type instead of the component for jdbc and databases
This commit is contained in:
parent
a58f797fd1
commit
802fe8b65d
|
@ -12,12 +12,12 @@ public class DBComponent extends DDSpanContextDecorator {
|
|||
|
||||
public DBComponent() {
|
||||
super();
|
||||
this.setMatchingTag(Tags.COMPONENT.getKey());
|
||||
this.setMatchingTag(Tags.DB_TYPE.getKey());
|
||||
this.setSetTag(DDTags.SERVICE_NAME);
|
||||
}
|
||||
|
||||
@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
|
||||
if (super.afterSetTag(context, tag, value)) {
|
||||
//Assign span type to DB
|
||||
|
|
|
@ -5,17 +5,6 @@ decorators:
|
|||
matchingValue: java-okhttp
|
||||
setValue: http-client
|
||||
- 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
|
||||
matchingValue: java-aws-sdk
|
||||
setValue: aws-client
|
||||
|
|
Loading…
Reference in New Issue