This repository was archived by the owner on Oct 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
packages/opencensus-core/src/trace/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class RootSpan extends SpanBaseModel implements OnEndSpanEventListener {
7171 }
7272
7373 public onEndSpan ( span : Span ) {
74- debug ( '%s notified ending by %o' , { id : span . id , name : span . name } )
74+ debug ( 'ended span notified %o' , { id : span . id , name : span . name } )
7575 }
7676
7777 public startSpan ( name : string , type : string ) {
Original file line number Diff line number Diff line change @@ -78,13 +78,13 @@ export class Tracer implements OnEndSpanEventListener {
7878
7979
8080 public onEndSpan ( root :RootSpan ) : void {
81- if ( ! this . currentRootSpan ) {
81+ if ( ! root ) {
8282 return debug ( 'cannot end trace - no active trace found' )
8383 }
8484 if ( this . currentRootSpan != root ) {
85- return debug ( 'currentRootSpan != root on notifyEnd. Possbile implementation bug .' )
85+ debug ( 'currentRootSpan != root on notifyEnd. Need more investigation .' )
8686 }
87- this . notifyEndSpan ( this . currentRootSpan ) ;
87+ this . notifyEndSpan ( root ) ;
8888 //this.clearCurrentTrace();
8989 }
9090
@@ -95,6 +95,7 @@ export class Tracer implements OnEndSpanEventListener {
9595
9696 private notifyEndSpan ( root : RootSpan ) {
9797 if ( this . active ) {
98+ debug ( 'starting to notify listeners the end of rootspans' )
9899 if ( this . eventListeners && this . eventListeners . length > 0 ) {
99100 this . eventListeners . forEach ( ( listener ) => listener . onEndSpan ( root ) )
100101 }
You can’t perform that action at this time.
0 commit comments