Skip to content

Commit

Permalink
Set the active transaction name on the event
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Mar 8, 2024
1 parent 1b9e3b2 commit f51c33a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Integration/TransactionIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ public function setupOnce(): void
return $event;
}

$transaction = SentrySdk::getCurrentHub()->getTransaction();
if ($transaction !== null) {
$event->setTransaction($transaction->getName());

return $event;
}

if (isset($hint->extra['transaction']) && \is_string($hint->extra['transaction'])) {
$event->setTransaction($hint->extra['transaction']);
} elseif (isset($_SERVER['PATH_INFO'])) {
Expand Down

0 comments on commit f51c33a

Please sign in to comment.