Skip to content

Commit

Permalink
FRW-9743 updated status code
Browse files Browse the repository at this point in the history
  • Loading branch information
gechetspr committed Jan 15, 2025
1 parent 0f72be9 commit 81591d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public static function register(): void

if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 600) {
$span->setStatus(StatusCode::STATUS_ERROR);
} else {
$span->setStatus(StatusCode::STATUS_OK);
}
$span->end();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public static function shutdownHandler(): void
$span->setStatus($exceptions || static::$cliSuccess === false ? StatusCode::STATUS_ERROR : StatusCode::STATUS_OK);

$span->setAttributes($customParamsStorage->getAttributes());
$span->setAttribute(TraceAttributes::HTTP_RESPONSE_STATUS_CODE, http_response_code());
$span->end();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CachedInstrumentation implements CachedInstrumentationInterface
/**
* @var string
*/
protected const INSTRUMENTATION_VERSION = '0.1.0';
protected const INSTRUMENTATION_VERSION = '1.4.0';

/**
* @var \OpenTelemetry\API\Instrumentation\CachedInstrumentation|null
Expand Down

0 comments on commit 81591d9

Please sign in to comment.