Fix NPE in elasticsearch plugin (#167)

This commit is contained in:
xzyJavaX 2022-04-29 12:53:14 +08:00 committed by GitHub
parent 8ae57d25a0
commit edc69ed847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -12,6 +12,7 @@ Release Notes.
* Fix NPE in gateway plugin when the timer triggers webflux webclient call.
* Add an optional plugin, trace-sampler-cpu-policy-plugin, which could disable trace collecting in high CPU load.
* Change the dateformat of logs to `yyyy-MM-dd HH:mm:ss.SSS`(was `yyyy-MM-dd HH:mm:ss:SSS`).
* Fix NPE in elasticsearch plugin.
#### Documentation

View File

@ -66,7 +66,9 @@ public class AdapterActionFutureActionGetMethodsInterceptor implements InstanceM
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
ContextManager.activeSpan().log(t);
if (isTrace(objInst)) {
ContextManager.activeSpan().log(t);
}
}
private boolean isTrace(EnhancedInstance objInst) {

View File

@ -67,7 +67,9 @@ public class AdapterActionFutureActionGetMethodsInterceptor implements InstanceM
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
ContextManager.activeSpan().log(t);
if (isTrace(objInst)) {
ContextManager.activeSpan().log(t);
}
}
private boolean isTrace(EnhancedInstance objInst) {