You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/05/14 11:55:06 UTC

[GitHub] [eventmesh] mxsm opened a new pull request, #3930: [ISSUE #3928]Optimize http protocol log print

mxsm opened a new pull request, #3930:
URL: https://github.com/apache/eventmesh/pull/3930

   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes #<XXX>`.)
   -->
   
   Fixes #3928 
   
   ### Motivation
   
   *Explain the content here.*
   *Explain why you want to make the changes and what problem you're trying to solve.*
   
   
   
   ### Modifications
   
   *Optimize http protocol log print*
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [eventmesh] xwm1992 commented on pull request #3930: [ISSUE #3928]Optimize http protocol log print

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-1562448285

   @mxsm please fix the conflict.


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] codecov[bot] commented on pull request #3930: [ISSUE #3928]Optimize http protocol log print

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-1548914945

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#3930](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (bb19fbb) into [master](https://app.codecov.io/gh/apache/eventmesh/commit/ef917b9c5ae198bec3f2ebbf777fa75687803808?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ef917b9) will **decrease** coverage by `0.01%`.
   > The diff coverage is `5.12%`.
   
   > :exclamation: Current head bb19fbb differs from pull request most recent head a9b1273. Consider uploading reports for the commit a9b1273 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3930      +/-   ##
   ============================================
   - Coverage     13.93%   13.93%   -0.01%     
   + Complexity     1291     1290       -1     
   ============================================
     Files           571      571              
     Lines         28803    28764      -39     
     Branches       2807     2788      -19     
   ============================================
   - Hits           4015     4009       -6     
   + Misses        24413    24380      -33     
     Partials        375      375              
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...org/apache/eventmesh/runtime/trace/TraceUtils.java](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3RyYWNlL1RyYWNlVXRpbHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `1.22% <6.45%> (+0.09%)` | :arrow_up: |
   
   ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/eventmesh/pull/3930/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] mxsm commented on pull request #3930: [ISSUE #3928]Optimize http protocol log print

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-1577002633

   @xwm1992 PTAL~ I have fixed it


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [PR] [ISSUE #3928]Optimize http protocol log print (eventmesh)

Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#discussion_r1575606797


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/TraceUtils.java:
##########
@@ -106,18 +100,21 @@ public static void finishSpan(ChannelHandlerContext ctx, CloudEvent event) {
     public static void finishSpanWithException(ChannelHandlerContext ctx, CloudEvent event,
         String errMsg, Throwable e) {
         try {
-            log.debug("finishSpanWithException with event:{}", event);
+            if (log.isWarnEnabled()) {
+                log.warn("finishSpanWithException with event:{}", event);
+            }
             EventMeshServer.getTrace().addTraceInfoToSpan(ctx, event);
             EventMeshServer.getTrace().finishSpan(ctx, StatusCode.ERROR, errMsg, e);
         } catch (Throwable ex) {
             log.error("upload trace fail when finishSpanWithException", ex);
         }
     }
 
-    public static void finishSpanWithException(Span span, Map<String, Object> map, String errMsg,
-        Throwable e) {
+    public static void finishSpanWithException(Span span, Map<String, Object> map, String errMsg, Throwable e) {
         try {
-            log.debug("finishSpanWithException with map:{}", map);
+            if (log.isWarnEnabled()) {
+                log.warn("FinishSpanWithException with map:{}", map);
+            }

Review Comment:
   May I ask that why logging level should be upgraded to `warn` here?
   
   By the way, `log.isWarnEnabled()` is redundant~



-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [PR] [ISSUE #3928]Optimize http protocol log print (eventmesh)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-2070567075

   It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.
   
   If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] mxsm commented on pull request #3930: [ISSUE #3928]Optimize http protocol log print

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-1580914577

   @xwm1992 PTAL~ I have fixed it


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [PR] [ISSUE #3928]Optimize http protocol log print (eventmesh)

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#issuecomment-2070567899

   ## [Codecov](https://app.codecov.io/gh/apache/eventmesh/pull/3930?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `5.26316%` with `36 lines` in your changes are missing coverage. Please review.
   > Project coverage is 14.24%. Comparing base [(`fb144bb`)](https://app.codecov.io/gh/apache/eventmesh/commit/fb144bb1d0d838ef2a4d1cccc2bd7877bd4ab09f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`8d79523`)](https://app.codecov.io/gh/apache/eventmesh/pull/3930?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 412 commits behind head on master.
   
   > :exclamation: Current head 8d79523 differs from pull request most recent head 663d4dc. Consider uploading reports for the commit 663d4dc to get more accurate results
   
   | [Files](https://app.codecov.io/gh/apache/eventmesh/pull/3930?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&filepath=eventmesh-runtime%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fruntime%2Fboot%2FAbstractHTTPServer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | 6.45% | [29 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../org/apache/eventmesh/runtime/util/TraceUtils.java](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&filepath=eventmesh-runtime%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Feventmesh%2Fruntime%2Futil%2FTraceUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3V0aWwvVHJhY2VVdGlscy5qYXZh) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/eventmesh/pull/3930?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3930      +/-   ##
   ============================================
   + Coverage     14.22%   14.24%   +0.01%     
     Complexity     1328     1328              
   ============================================
     Files           580      580              
     Lines         28856    28825      -31     
     Branches       2792     2786       -6     
   ============================================
     Hits           4105     4105              
   + Misses        24361    24330      -31     
     Partials        390      390              
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/eventmesh/pull/3930?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org