horoc commented on code in PR #2801:
URL:
https://github.com/apache/incubator-eventmesh/pull/2801#discussion_r1060680786
##########
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:
I wonder if is it possible that the request is null or the request's method
is null?
--
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]