You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/03/17 09:51:35 UTC

[GitHub] [skywalking] pkxiuluo opened a new issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

pkxiuluo opened a new issue #6562:
URL: https://github.com/apache/skywalking/issues/6562


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [x] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Bug
   - Which version of SkyWalking, OS, and JRE?
   skywalking: 8.3.0
   OS: centos 6.7
   JRE : 1.8
   
   
   - What happened?
   MultiScopesAnalysisListener#setPublicAttrs log warn   frequently
   
   ```
   private void setPublicAttrs(SourceBuilder sourceBuilder, SpanObject span) {
          xxxxxxx
           span.getTagsList().forEach(tag -> {
               if (SpanTags.STATUS_CODE.equals(tag.getKey())) {
                   try {
                       sourceBuilder.setResponseCode(Integer.parseInt(tag.getValue()));
                   } catch (NumberFormatException e) {
                       log.warn("span {} has illegal status code {}", span, tag.getValue());
                   }
               }
               sourceBuilder.setTag(tag);
           });
           xxxxxxx
   }
   ```
   
   As above code ,backend only accept status_code as Integer type, but some agent plugins  sent a String .
   Because of STATUS_CODE defined  by  Tags#STATUS_CODE in apm agent-core is a StringTag, Most of agent plugin will use Integer.toString to guarantee it correct. but some plugin dosenot obey this rules,such as grpc_v1 、rocketmq_3.x、rocketmq_4.x 。
   
   Suggestion:
   create the IntTag class as subclass AbstractTag of  for STATUS_CODE , fix all agent plugins.
   
   
   
   


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6562:
URL: https://github.com/apache/skywalking/issues/6562#issuecomment-800951622


   > create the IntTag class as subclass AbstractTag of for STATUS_CODE , fix all agent plugins.
   
   Make sense. Are you going to work on this?
   
   > but some plugin dosenot obey this rules,such as grpc_v1 、rocketmq_3.x、rocketmq_4.x
   
   They should use a new RESPONSE_CODE(StringTag), and also add responseCodeStr in the `SourceBuilder` and other `Sources`. Then the OAL script could use this kind of tag. 


----------------------------------------------------------------
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.

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



[GitHub] [skywalking] wu-sheng commented on issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6562:
URL: https://github.com/apache/skywalking/issues/6562#issuecomment-876418461


   > I think I can fix this if no one else is working on it.
   
   @wallezhang assigned, no one is working on this.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wallezhang commented on issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

Posted by GitBox <gi...@apache.org>.
wallezhang commented on issue #6562:
URL: https://github.com/apache/skywalking/issues/6562#issuecomment-876367098


   I think I can fix this if no one else is working on 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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng closed issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6562:
URL: https://github.com/apache/skywalking/issues/6562


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking] wu-sheng commented on issue #6562: MultiScopesAnalysisListener#setPublicAttrs log warn frequently

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6562:
URL: https://github.com/apache/skywalking/issues/6562#issuecomment-822865974


   @pkxiuluo Are you going to fix this?


-- 
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.

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