Skip to content

Commit 5ddbf8b

Browse files
committed
Don't send OutOfMemoryError to the telemetry
1 parent fef9d16 commit 5ddbf8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dd-java-agent/agent-logging/src/main/java/datadog/trace/logging/ddlogger/DDTelemetryLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private void telemetryLog(LogLevel level, Marker marker, String msgOrgFormat, Th
4242
}
4343
// Report only messages with Throwable or explicitly marked with SEND_TELEMETRY.
4444
// This might be extended to error level without throwable.
45-
if (t == null && marker != LogCollector.SEND_TELEMETRY) {
45+
if (marker != LogCollector.SEND_TELEMETRY && (t == null || t instanceof OutOfMemoryError)) {
4646
return;
4747
}
4848
LogCollector.get().addLogMessage(level.name(), msgOrgFormat, t);

0 commit comments

Comments
 (0)