Skip to content

Commit 4319353

Browse files
authored
Merge pull request #335 from Amit-A-Ishai/W-11695783-Add-exception-name
Added logging of exception name
2 parents b96086d + 5fd6d0b commit 4319353

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

timbermill-java/timbermill-api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<properties>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
<java.source-target.version>1.8</java.source-target.version>
19-
<timbermill.version>2.4.9</timbermill.version>
19+
<timbermill.version>2.5.0</timbermill.version>
2020
<slf4jVersion>1.7.28</slf4jVersion>
2121
</properties>
2222

timbermill-java/timbermill-api/src/main/java/com/datorama/oss/timbermill/EventLogger.java

+3
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ private Event createErrorEvent(Throwable t, String ongoingTaskId, LogParams logP
275275
} catch (Exception e){
276276
logParams.text(Constants.EXCEPTION, t.getMessage());
277277
}
278+
279+
logParams.string(Constants.EXCEPTION_TYPE, t.getClass().getSimpleName());
280+
logParams.string(Constants.EXCEPTION_MESSAGE, t.getMessage());
278281
}
279282
Event e;
280283
if (ongoingTaskId == null) {

timbermill-java/timbermill-api/src/main/java/com/datorama/oss/timbermill/common/Constants.java

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ public final class Constants {
55
public static final String LOG_WITHOUT_CONTEXT = "LogWithoutContext";
66
public static final String HEARTBEAT_TASK = "metadata_timbermill_client_heartbeat";
77
public static final String EXCEPTION = "exception";
8+
public static final String EXCEPTION_TYPE = "exceptionType";
9+
public static final String EXCEPTION_MESSAGE = "exceptionMessage";
810
public static final String CORRUPTED_REASON = "corruptedReason";
911
public static final int MAX_CHARS_ALLOWED_FOR_NON_ANALYZED_FIELDS = 8000;
1012
public static final int MAX_CHARS_ALLOWED_FOR_ANALYZED_FIELDS = 900000;

timbermill-java/timbermill-client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<properties>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1717
<java.source-target.version>1.8</java.source-target.version>
18-
<timbermill.version>2.4.9</timbermill.version>
18+
<timbermill.version>2.5.0</timbermill.version>
1919
<aspectj.version>1.9.6</aspectj.version>
2020
<org.springframework.version>5.3.20</org.springframework.version>
2121
</properties>

timbermill-java/timbermill-local/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<properties>
1616
<java.source-target.version>1.8</java.source-target.version>
17-
<timbermill.version>2.4.9</timbermill.version>
17+
<timbermill.version>2.5.0</timbermill.version>
1818
<kamon.bundle.version>2.0.4</kamon.bundle.version>
1919
</properties>
2020

timbermill-java/timbermill-server/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<properties>
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1919
<java.source-target.version>1.8</java.source-target.version>
20-
<timbermill.version>2.4.9</timbermill.version>
20+
<timbermill.version>2.5.0</timbermill.version>
2121
<slf4jVersion>1.7.28</slf4jVersion>
2222
</properties>
2323

0 commit comments

Comments
 (0)