diff --git a/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboConsumerFilter.java b/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboConsumerFilter.java index 4df20d46..85b268d8 100755 --- a/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboConsumerFilter.java +++ b/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboConsumerFilter.java @@ -57,7 +57,13 @@ public class SentinelDubboConsumerFilter extends AbstractDubboFilter implements ContextUtil.enter(resourceName); interfaceEntry = SphU.entry(invoker.getInterface().getName(), EntryType.OUT); methodEntry = SphU.entry(resourceName, EntryType.OUT); - return invoker.invoke(invocation); + + Result result = invoker.invoke(invocation); + if (result.hasException()) { + // Record common exception. + Tracer.trace(result.getException()); + } + return result; } catch (BlockException e) { return DubboFallbackRegistry.getConsumerFallback().handle(invoker, invocation, e); } catch (RpcException e) { diff --git a/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java b/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java index 0eacab2d..c82afb8b 100755 --- a/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java +++ b/sentinel-adapter/sentinel-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java @@ -63,7 +63,11 @@ public class SentinelDubboProviderFilter extends AbstractDubboFilter implements interfaceEntry = SphU.entry(interfaceName, EntryType.IN); methodEntry = SphU.entry(resourceName, EntryType.IN, 1, invocation.getArguments()); - return invoker.invoke(invocation); + Result result = invoker.invoke(invocation); + if (result.hasException()) { + Tracer.trace(result.getException()); + } + return result; } catch (BlockException e) { return DubboFallbackRegistry.getProviderFallback().handle(invoker, invocation, e); } catch (RpcException e) {