Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/EventListener/TracingConsoleListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@
return;
}

$span = $this->hub->getSpan();
$transaction = $this->hub->getTransaction();

if (null !== $span) {
$span->setStatus(0 === $event->getExitCode() ? SpanStatus::ok() : SpanStatus::internalError());
$span->finish();
if (null !== $transaction) {
$transaction->setStatus(0 === $event->getExitCode() ? SpanStatus::ok() : SpanStatus::internalError());
$transaction->finish();
metrics()->flush();

Check failure on line 99 in src/EventListener/TracingConsoleListener.php

View workflow job for this annotation

GitHub Actions / PHPStan

Function metrics not found.

Check failure on line 99 in src/EventListener/TracingConsoleListener.php

View workflow job for this annotation

GitHub Actions / Psalm

UndefinedFunction

src/EventListener/TracingConsoleListener.php:99:13: UndefinedFunction: Function Sentry\SentryBundle\EventListener\metrics does not exist (see https://psalm.dev/021)
}
}

Expand Down
Loading