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/11/04 03:19:28 UTC

[GitHub] [skywalking] qinshaokang edited a comment on issue #6433: apm-toolkit-opentracing support seting Component and SpanLayer.

qinshaokang edited a comment on issue #6433:
URL: https://github.com/apache/skywalking/issues/6433#issuecomment-960422997


   I think i got it. Take a look at this method.
   
   `
   public SpanBuilder withTag(String key, String value) {
           if (Tags.SPAN_KIND.getKey().equals(key)) {
               if (!"client".equals(value) && !"producer".equals(value)) {
                   if (!"server".equals(value) && !"consumer".equals(value)) {
                       this.isEntry = false;
                       this.isExit = false;
                   } else {
                       this.isEntry = true;
                       this.isExit = false;
                   }
               } else {
                   this.isEntry = false;
                   this.isExit = true;
               }
           } else if (!Tags.PEER_HOST_IPV4.getKey().equals(key) && !Tags.PEER_HOST_IPV6.getKey().equals(key) && !Tags.PEER_HOSTNAME.getKey().equals(key)) {
               if (Tags.PEER_SERVICE.getKey().equals(key)) {
                   this.operationName = value;
               } else {
                   this.tags.add(new Tag(key, value));
               }
           } else {
               this.peer = value;
           }
   
           return 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