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:
[email protected]