* Fix issue #5795 Fix the issue: nutz plugin throw NPE at afterMethod, cause traceid keep unchange for the thread * fix the style and modify the CHANGES.md Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com> Co-authored-by: simonlei <simonlei@tencent.com> Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
This commit is contained in:
parent
c32caab6e0
commit
901e8d8423
|
|
@ -15,6 +15,7 @@ Release Notes.
|
|||
* Make the okhttp3 plugin to support Java 14
|
||||
* Polish tracing context related codes.
|
||||
* Add the plugin for async-http-client 2.x
|
||||
* Fix NPE in the nutz plugin.
|
||||
|
||||
#### OAP-Backend
|
||||
* Add the `@SuperDataset` annotation for BrowserErrorLog.
|
||||
|
|
|
|||
|
|
@ -63,11 +63,12 @@ public class SenderSendInterceptor implements InstanceMethodsAroundInterceptor {
|
|||
public Object afterMethod(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
|
||||
final Class<?>[] argumentsTypes, Object ret) throws Throwable {
|
||||
Response response = (Response) ret;
|
||||
int statusCode = response.getStatus();
|
||||
AbstractSpan span = ContextManager.activeSpan();
|
||||
if (statusCode >= 400) {
|
||||
|
||||
if (response == null || response.getStatus() >= 400) {
|
||||
span.errorOccurred();
|
||||
Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
|
||||
if (response != null)
|
||||
Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
|
||||
}
|
||||
ContextManager.stopSpan();
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue