You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TypeName in TelemetryExceptionDetails should be what is at the left side of first semicolon in the first line of the stack trace.
If the exception message contains colons, the parsing is wrong. E.g: Given the folowing stack trace
org.example.MyCustomException: Invalid character ':' Don't use colons!
at org.example.code1(example1.java:42)
at org.example.code2(example2.java:42)
Expected behavior
TypeName = "org.example.MyCustomException"
Mesage = "Invalid character ':' Don't use colons!"
Actual behavior
TypeName = "org.example.MyCustomException: Invalid character '"
Mesage = "' Don't use colons!"
Suggested patch
diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/exporter/Exceptions.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/exporter/Exceptions.java
index fcdbbe5908..91d2bbd8d7 100644
--- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/exporter/Exceptions.java+++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/exporter/Exceptions.java@@ -36,7 +36,7 @@ public class Exceptions {
int current;
for (current = 0; current < length; current++) {
char c = str.charAt(current);
- if (c == ':') {+ if (c == ':' && separator != -1) {
separator = current;
} else if (c == '\r' || c == '\n') {
break;
The text was updated successfully, but these errors were encountered:
The TypeName in TelemetryExceptionDetails should be what is at the left side of first semicolon in the first line of the stack trace.
If the exception message contains colons, the parsing is wrong. E.g: Given the folowing stack trace
Expected behavior
Actual behavior
Suggested patch
The text was updated successfully, but these errors were encountered: