Skip to content

Commit b9d81f2

Browse files
committed
Used Globals
1 parent 6983605 commit b9d81f2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Instrumentation/PDO/src/PDOInstrumentation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace OpenTelemetry\Contrib\Instrumentation\PDO;
66

7+
use OpenTelemetry\API\Globals;
78
use OpenTelemetry\API\Instrumentation\CachedInstrumentation;
8-
use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
99
use OpenTelemetry\API\Trace\Span;
1010
use OpenTelemetry\API\Trace\SpanBuilderInterface;
1111
use OpenTelemetry\API\Trace\SpanKind;
@@ -414,8 +414,7 @@ private static function getSqlCommenterDatabase(): array
414414
private static function addSqlComments(string $query): string
415415
{
416416
$comments = [];
417-
$prop = TraceContextPropagator::getInstance();
418-
$prop->inject($comments);
417+
Globals::propagator()->inject($comments);
419418
$query = trim($query);
420419
if (self::isSqlCommenterPrepend()) {
421420
return Utils::formatComments(array_filter($comments)) . $query;

0 commit comments

Comments
 (0)