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/24 04:05:27 UTC

[GitHub] [skywalking] lorgine opened a new issue #6610: skywalking thread context transfer?

lorgine opened a new issue #6610:
URL: https://github.com/apache/skywalking/issues/6610


   when i deep into skywalking code? i hava a issue? why just capture context,and not capture `runtimecontext?`
   
   ```
   public class ThreadingConstructorInterceptor implements InstanceConstructorInterceptor {
   
       @Override
       public void onConstruct(final EnhancedInstance objInst, final Object[] allArguments) {
           if (ContextManager.isActive()) {      
               objInst.setSkyWalkingDynamicField(ContextManager.capture());     
           }
       }
   }
   ```
   
   and in the method 
   ContextManager.getRuntimeContext().capture()
   this method just capture the default key context?
   
   ```
   public class RuntimeContextConfiguration {
       public static String[] NEED_PROPAGATE_CONTEXT_KEY = new String[] {
           "SW_REQUEST",
           "SW_RESPONSE",
           "SW_WEBFLUX_REQUEST_KEY"
       };
   }
   ```
   ```
   public RuntimeContextSnapshot capture() {
           Map<Object, Object> runtimeContextMap = new HashMap<>();
           for (String key : RuntimeContextConfiguration.NEED_PROPAGATE_CONTEXT_KEY) {
               Object value = this.get(key);
               if (value != null) {
                   runtimeContextMap.put(key, value);
               }
           }
           return new RuntimeContextSnapshot(runtimeContextMap);
       }
   ```
   
   can you give some sugustion?
   


-- 
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 #6610: skywalking thread context transfer?

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


   From the current codebase, yes, this is not allowed to extend without changing codes. And to be honest, a private version is hard to judge, so, it is hard to discuss features of a private version.


-- 
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] lorgine removed a comment on issue #6610: skywalking thread context transfer?

Posted by GitBox <gi...@apache.org>.
lorgine removed a comment on issue #6610:
URL: https://github.com/apache/skywalking/issues/6610#issuecomment-806292182


   my scenario is i just want to transfer some data into thread,but i don't want to transfef these data cross transfer like http? and i can do what?


-- 
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 #6610: skywalking thread context transfer?

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


   I have said very clearly, unless you open source your case/code, this discussion is hard to keep.


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   ok, I will open my code later.


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   i need to devlop sky second times. and i want to transfer some object context into thread。by default, i cant't do this. depend on source code,if i want to realize this function, i need to change source code, so i want to ask this scenario is right?
   
   


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   my scenario is i just want to transfer some data into thread,but i don't want to transfef these data cross transfer like http? and i can do what?


-- 
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 #6610: skywalking thread context transfer?

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


   I think you are not asking questions from the right point. The community is impossible to explain all codes of all cases, those are your responsibility. If you want some questions and new cases, we could focus on that.
   Otherwise, the people of the community are going to face endless source code questions.


-- 
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 #6610: skywalking thread context transfer?

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


   Are you talking about an upstream plugin or some private codes?


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   i need to devlop second times. and i want to transfer context into thread。i found it is wrong. and specialy sometimes i want to transfer object into thread. depend on source code,i found i need to change source code,and the orgin code has no this fuction, so i want to ask this scenario is right?


-- 
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 closed issue #6610: skywalking thread context transfer?

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


   


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   my scenario is i just want to transfer some context data into thread,but i don't want to transfef these data cross transfer like http? and i can do what?
   
   


-- 
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 edited a comment on issue #6610: skywalking thread context transfer?

Posted by GitBox <gi...@apache.org>.
wu-sheng edited a comment on issue #6610:
URL: https://github.com/apache/skywalking/issues/6610#issuecomment-805515071


   I think you are not asking questions from the right point. The community is impossible to explain all codes of all cases, those are your responsibility. If you have some questions and new cases, we could focus on that.
   Otherwise, the people of the community are going to face endless source code questions.


-- 
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] lorgine removed a comment on issue #6610: skywalking thread context transfer?

Posted by GitBox <gi...@apache.org>.
lorgine removed a comment on issue #6610:
URL: https://github.com/apache/skywalking/issues/6610#issuecomment-806294594


   i need to devlop second times. and i want to transfer context into thread。i found it is wrong. and specialy sometimes i want to transfer object into thread. depend on source code,i found i need to change source code,and the orgin code has no this fuction, so i want to ask this scenario is right?


-- 
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] lorgine commented on issue #6610: skywalking thread context transfer?

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


   in next version, it will add this function?


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