Skip to content

Commit

Permalink
Set and restore span on the current scope (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Oct 12, 2020
1 parent 8d5f17a commit 722f6eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Sentry/Laravel/Tracing/ViewEngineDecorator.php
Expand Up @@ -41,14 +41,13 @@ public function get($path, array $data = []): string

$span = $parentSpan->startChild($context);

$scope = SentrySdk::getCurrentHub()->pushScope();
$scope->setSpan($span);
SentrySdk::getCurrentHub()->setSpan($span);

$result = $this->engine->get($path, $data);

$span->finish();

SentrySdk::getCurrentHub()->popScope();
SentrySdk::getCurrentHub()->setSpan($parentSpan);

return $result;
}
Expand Down

0 comments on commit 722f6eb

Please sign in to comment.