Skip to content

Commit 8db5f78

Browse files
committed
Added nesting level tag
1 parent ab282e8 commit 8db5f78

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Decorator/JaegerConnectionDecorator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public function __construct(Connection $connection, TracerInterface $tracer)
2828

2929
public function connect()
3030
{
31+
if ($this->isConnected()) {
32+
return;
33+
}
3134
$span = $this->tracer
3235
->start('dbal.connect')
3336
->addTag(new DbInstanceTag($this->getDatabase()))

src/Wrapper/JaegerConnectionWrapper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public function setTracer(TracerInterface $tracer)
3232

3333
public function connect()
3434
{
35+
if ($this->isConnected()) {
36+
return;
37+
}
3538
$span = $this->tracer
3639
->start('dbal.connect')
3740
->addTag(new DbInstanceTag($this->getDatabase()))

0 commit comments

Comments
 (0)