Skip to content

Commit

Permalink
Fix span status for 4XX responses (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecsammon authored Sep 4, 2024
1 parent 15427f3 commit 89117db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function hookHandle(): bool
}

if ($response) {
if ($response->getStatusCode() >= 400) {
if ($response->getStatusCode() >= 500) {
$span->setStatus(StatusCode::STATUS_ERROR);
}
$span->setAttribute(TraceAttributes::HTTP_RESPONSE_STATUS_CODE, $response->getStatusCode());
Expand Down

0 comments on commit 89117db

Please sign in to comment.