Skip to content

Commit

Permalink
skip query tracing for not supported sql operations
Browse files Browse the repository at this point in the history
  • Loading branch information
cappuc committed Feb 13, 2024
1 parent e47be2d commit 594e853
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Instrumentation/QueryInstrumentation.php
Expand Up @@ -29,6 +29,10 @@ public function recordQuery(QueryExecuted $event): void
default: fn () => ''
);

if ($operationName === '') {
return;
}

$span = Tracer::newSpan(sprintf('sql %s', $operationName))
->setSpanKind(SpanKind::KIND_CLIENT)
->setStartTimestamp($this->getEventStartTimestampNs($event->time))
Expand Down

0 comments on commit 594e853

Please sign in to comment.