Skip to content

Commit f7f6ef2

Browse files
authored
Set status for console command transactions
1 parent 5f8da13 commit f7f6ef2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/EventListener/TracingConsoleListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function handleConsoleTerminateEvent(ConsoleTerminateEvent $event): void
9393
$span = $this->hub->getSpan();
9494

9595
if (null !== $span) {
96+
$span->setStatus($event->getExitCode() === 0 ? SpanStatus::ok() : SpanStatus::internalError());
9697
$span->finish();
9798
}
9899
}

0 commit comments

Comments
 (0)