88use Jaeger \Span \Context \SpanContext ;
99use Jaeger \Span \Factory \SpanFactoryInterface ;
1010use Jaeger \Span \SpanInterface ;
11- use Jaeger \Span \SpanManager ;
11+ use Jaeger \Span \SpanManagerInterface ;
1212
1313class Tracer implements
1414 TracerInterface,
@@ -26,7 +26,7 @@ class Tracer implements
2626
2727 private $ client ;
2828
29- public function __construct (SpanManager $ manager , SpanFactoryInterface $ factory , ClientInterface $ client )
29+ public function __construct (SpanManagerInterface $ manager , SpanFactoryInterface $ factory , ClientInterface $ client )
3030 {
3131 $ this ->manager = $ manager ;
3232 $ this ->factory = $ factory ;
@@ -83,7 +83,7 @@ public function getClient(): ClientInterface
8383 public function debug (string $ operationName , array $ tags = []): SpanInterface
8484 {
8585 $ span = $ this ->factory ->parent ($ this , $ operationName , str_shuffle ('01234567890abcdef ' ), $ tags );
86- $ this ->manager ->push ($ span );
86+ $ this ->manager ->new ($ span );
8787
8888 return $ span ;
8989 }
@@ -95,7 +95,7 @@ public function start(string $operationName, array $tags = [], SpanContext $user
9595 } else {
9696 $ span = $ this ->factory ->child ($ this , $ operationName , $ context , $ tags );
9797 }
98- $ this ->manager ->push ($ span );
98+ $ this ->manager ->new ($ span );
9999
100100 return $ span ;
101101 }
@@ -112,7 +112,7 @@ public function finish(SpanInterface $span, int $duration = 0): void
112112
113113 return ;
114114 }
115- $ this ->manager ->pop ( );
115+ $ this ->manager ->finish ( $ span );
116116 if (false === $ span ->isSampled ()) {
117117 return ;
118118 }
0 commit comments