Skip to content

Commit de014f8

Browse files
committed
Fix span manger state reset
1 parent 9fd24ce commit de014f8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Span/StackSpanManager.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class StackSpanManager implements SpanManagerInterface
1111
{
1212
private $stack;
1313

14+
/** @var SpanContext|null */
1415
private $context;
1516

1617
public function __construct()
@@ -24,6 +25,7 @@ public function __construct()
2425
public function reset(): ResettableInterface
2526
{
2627
$this->stack = new \SplStack();
28+
$this->context = null;
2729

2830
return $this;
2931
}
@@ -36,8 +38,9 @@ public function reset(): ResettableInterface
3638
public function assign(SpanContext $context): InjectableInterface
3739
{
3840
$this->context = $context;
41+
$this->stack = new \SplStack();
3942

40-
return $this->reset();
43+
return $this;
4144
}
4245

4346
/**

src/Tracer/Tracer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function assign(SpanContext $context): InjectableInterface
6464
public function reset(): ResettableInterface
6565
{
6666
$this->manager->reset();
67+
$this->debugId = '';
6768

6869
return $this;
6970
}

0 commit comments

Comments
 (0)