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/06/29 12:05:47 UTC
[GitHub] [skywalking] xuanyu66 opened a new issue #7200: ExitSpan can't log exception when asyncFinish
xuanyu66 opened a new issue #7200:
URL: https://github.com/apache/skywalking/issues/7200
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Question or discussion
- [X] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
___
### Question
- What do you want to know?
___
### Bug
- What happened?
ExitSpan has limit to log, only when stackDepth is equals to 1.
```
@Override
public ExitSpan log(Throwable t) {
if (stackDepth == 1) {
super.log(t);
}
return this;
}
```
But when ExitSpan invoke asyncFinish(), its stackDepth usually turns to be zero.
Because when finish span at context meanwhile invoke StackBasedTracingSpan#finish() which set stackDepth to zero
```
@Override
public boolean finish(TraceSegment owner) {
if (--stackDepth == 0) {
return super.finish(owner);
} else {
return false;
}
}
```
--
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 #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871129074
OK, then this is a bug fix. Take a look at how we use `EntrySpan#isInAsyncMode` in `setOperationName`.
--
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 #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #7200:
URL: https://github.com/apache/skywalking/issues/7200
--
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] xuanyu66 commented on issue #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
xuanyu66 commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871149299
https://github.com/apache/skywalking/pull/7086
--
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] xuanyu66 commented on issue #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
xuanyu66 commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871047060
We find thrift async call can't log exception.
```
public class TAsyncMethodCallInterceptor implements InstanceConstructorInterceptor, InstanceMethodsAroundInterceptor {
private String remotePeer = "UNKNOWN";
@Override
public void onConstruct(EnhancedInstance objInst,
Object[] allArguments) throws NoSuchFieldException, IllegalAccessException {
ReflectionUtils.setValue(TAsyncMethodCall.class, objInst, "callback", new AsyncMethodCallback<Object>() {
final AsyncMethodCallback<Object> callback = (AsyncMethodCallback) allArguments[3];
@Override
public void onComplete(final Object response) {
try {
AsyncSpan span = (AsyncSpan) objInst.getSkyWalkingDynamicField();
span.asyncFinish();
} finally {
callback.onComplete(response);
}
}
@Override
public void onError(final Exception exception) {
try {
AsyncSpan span = (AsyncSpan) objInst.getSkyWalkingDynamicField();
span.asyncFinish().log(exception);
} finally {
callback.onError(exception);
}
}
});
if (allArguments[2] instanceof EnhancedInstance) {
remotePeer = (String) ((EnhancedInstance) allArguments[2]).getSkyWalkingDynamicField();
}
}
```
--
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] xuanyu66 edited a comment on issue #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
xuanyu66 edited a comment on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871149299
https://github.com/apache/skywalking/pull/7086
This PR has already fix it, remove the condition if (stackDepth == 1)
```
@Override
public ExitSpan log(Throwable t) {
super.log(t);
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
[GitHub] [skywalking] xuanyu66 edited a comment on issue #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
xuanyu66 edited a comment on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871126554
> Is this an official plugin? Or something private?
official plugin
org.apache.skywalking.apm.plugin.thrift.client.TAsyncMethodCallInterceptor
--
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 #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-870654018
Yes, we don't support it yet. When do we need this? Do you have a plugin PR relating to 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] xuanyu66 commented on issue #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
xuanyu66 commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871126554
> Is this an official plugin? Or something private?
official plugin
--
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 #7200: ExitSpan can't log exception when asyncFinish
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7200:
URL: https://github.com/apache/skywalking/issues/7200#issuecomment-871049389
Is this an official plugin? Or something private?
--
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