jonyangx commented on code in PR #2801:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2801#discussion_r1061092794


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractHTTPServer.java:
##########
@@ -366,9 +367,12 @@ public void channelRead(final ChannelHandlerContext ctx, 
final Object message) {
 
                 if (useRequestURI) {
                     if (useTrace) {
-                        span.setAttribute(SemanticAttributes.HTTP_METHOD, 
httpRequest.method().name());
-                        span.setAttribute(SemanticAttributes.HTTP_FLAVOR, 
httpRequest.protocolVersion().protocolName());
-                        span.setAttribute(SemanticAttributes.HTTP_URL, 
httpRequest.uri());
+                        span.setAttribute(SemanticAttributes.HTTP_METHOD,
+                                
Objects.requireNonNull(Objects.requireNonNull(httpRequest).method()).name());
+                        span.setAttribute(SemanticAttributes.HTTP_FLAVOR,

Review Comment:
   @horoc 
   add npe check
           public void channelRead(final ChannelHandlerContext ctx, final 
Object message) {
               final HttpRequest httpRequest = (HttpRequest) message;
   
               if (httpRequest == null) {
                   return;
               }



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to