adding a close method to flush traces
This commit is contained in:
parent
c5184070f4
commit
0c06397094
|
@ -139,6 +139,10 @@ public class DDTracer implements io.opentracing.Tracer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spans are built using this builder
|
* Spans are built using this builder
|
||||||
*/
|
*/
|
||||||
|
@ -281,7 +285,7 @@ public class DDTracer implements io.opentracing.Tracer {
|
||||||
|
|
||||||
String serviceName = this.serviceName;
|
String serviceName = this.serviceName;
|
||||||
if (serviceName == null) {
|
if (serviceName == null) {
|
||||||
if(p != null){
|
if (p != null && p.getServiceName() != null) {
|
||||||
serviceName = p.getServiceName();
|
serviceName = p.getServiceName();
|
||||||
} else {
|
} else {
|
||||||
serviceName = defaultServiceName;
|
serviceName = defaultServiceName;
|
||||||
|
|
Loading…
Reference in New Issue