@@ -56,13 +56,13 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
5656 if ($ traceId = TracerContext::getTraceId ()) {
5757 $ response = $ response ->withHeader ('Trace-Id ' , $ traceId );
5858 }
59- $ span ->setTag ($ this ->spanTagManager ->get ('response ' , 'status_code ' ), $ response ->getStatusCode ());
59+ $ span ->setTag ($ this ->spanTagManager ->get ('response ' , 'status_code ' ), ( string ) $ response ->getStatusCode ());
6060 } catch (Throwable $ exception ) {
6161 if ($ this ->switchManager ->isEnable ('exception ' ) && ! $ this ->switchManager ->isIgnoreException ($ exception )) {
6262 $ this ->appendExceptionToSpan ($ span , $ exception );
6363 }
6464 if ($ exception instanceof HttpException) {
65- $ span ->setTag ($ this ->spanTagManager ->get ('response ' , 'status_code ' ), $ exception ->getStatusCode ());
65+ $ span ->setTag ($ this ->spanTagManager ->get ('response ' , 'status_code ' ), ( string ) $ exception ->getStatusCode ());
6666 }
6767 throw $ exception ;
6868 } finally {
@@ -76,7 +76,7 @@ protected function appendExceptionToSpan(Span $span, Throwable $exception): void
7676 {
7777 $ span ->setTag ('error ' , true );
7878 $ span ->setTag ($ this ->spanTagManager ->get ('exception ' , 'class ' ), get_class ($ exception ));
79- $ span ->setTag ($ this ->spanTagManager ->get ('exception ' , 'code ' ), $ exception ->getCode ());
79+ $ span ->setTag ($ this ->spanTagManager ->get ('exception ' , 'code ' ), ( string ) $ exception ->getCode ());
8080 $ span ->setTag ($ this ->spanTagManager ->get ('exception ' , 'message ' ), $ exception ->getMessage ());
8181 $ span ->setTag ($ this ->spanTagManager ->get ('exception ' , 'stack_trace ' ), (string ) $ exception );
8282 }
0 commit comments