This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new d4c4a25ca0b [improve][fn] Show the class name of exceptions for pulsar 
functions (#21833)
d4c4a25ca0b is described below

commit d4c4a25ca0b448f43201c11234559a102efc2948
Author: jiangpengcheng <[email protected]>
AuthorDate: Fri Jan 5 00:03:20 2024 +0800

    [improve][fn] Show the class name of exceptions for pulsar functions 
(#21833)
---
 .../apache/pulsar/functions/instance/stats/ComponentStatsManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/ComponentStatsManager.java
 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/ComponentStatsManager.java
index 85d68531b5b..6da3c082f78 100644
--- 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/ComponentStatsManager.java
+++ 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/ComponentStatsManager.java
@@ -149,7 +149,7 @@ public abstract class ComponentStatsManager implements 
AutoCloseable {
     protected InstanceCommunication.FunctionStatus.ExceptionInformation 
getExceptionInfo(Throwable th, long ts) {
         InstanceCommunication.FunctionStatus.ExceptionInformation.Builder 
exceptionInfoBuilder =
                 
InstanceCommunication.FunctionStatus.ExceptionInformation.newBuilder().setMsSinceEpoch(ts);
-        String msg = th.getMessage();
+        String msg = String.format("[%s]: %s", th.getClass().getName(), 
th.getMessage());
         if (msg != null) {
             exceptionInfoBuilder.setExceptionString(msg);
         }

Reply via email to