Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit cd6cf28

Browse files
committed
chord: merge commit
2 parents 4b78a1e + aeb0264 commit cd6cf28

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/opencensus-core/src/trace/model/root-span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class RootSpan extends SpanBaseModel implements OnEndSpanEventListener {
7272
}
7373

7474
public onEndSpan(span: Span) {
75-
debug('%s notified ending by %o',{id: span.id, name: span.name})
75+
debug('ended span notified %o', {id: span.id, name: span.name})
7676
}
7777

7878
public startSpan(name: string, type: string) {

packages/opencensus-core/src/trace/model/tracer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ export class Tracer implements OnEndSpanEventListener {
9292
}
9393

9494

95-
public onEndSpan(root: RootSpan): void {
96-
if (!this.currentRootSpan) {
95+
public onEndSpan(root:RootSpan): void {
96+
if (!root) {
9797
return debug('cannot end trace - no active trace found')
9898
}
99-
if (this.currentRootSpan != root) {
100-
return debug('currentRootSpan != root on notifyEnd. Possbile implementation bug.')
99+
if(this.currentRootSpan != root) {
100+
debug('currentRootSpan != root on notifyEnd. Need more investigation.')
101101
}
102-
this.notifyEndSpan(this.currentRootSpan);
102+
this.notifyEndSpan(root);
103103
//this.clearCurrentTrace();
104104
}
105105

@@ -111,8 +111,8 @@ export class Tracer implements OnEndSpanEventListener {
111111

112112
private notifyEndSpan(root: RootSpan) {
113113
if (this.active) {
114-
//this.buffer.onEndSpan(root);
115-
if (this.eventListeners && this.eventListeners.length > 0) {
114+
debug ('starting to notify listeners the end of rootspans')
115+
if(this.eventListeners&&this.eventListeners.length >0) {
116116
this.eventListeners.forEach((listener) => listener.onEndSpan(root))
117117
}
118118
} else {

0 commit comments

Comments
 (0)