Skip to content

Commit dfd0240

Browse files
Fix FINEST-level error logging in GrpcExporter to include stack trace
The FINEST log in onError used string concatenation (+ e) which only called toString(), missing the full stack trace. Changed to pass the exception as the Throwable parameter so the logging framework can properly render the complete stack trace at FINEST level. Resolves #8098
1 parent 9692c2b commit dfd0240

File tree

1 file changed

+1
-1
lines changed
  • exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc

1 file changed

+1
-1
lines changed

exporters/common/src/main/java/io/opentelemetry/exporter/internal/grpc/GrpcExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void onError(
133133
+ e.getMessage(),
134134
e);
135135
if (logger.isLoggable(Level.FINEST)) {
136-
logger.log(Level.FINEST, "Failed to export " + type + "s. Details follow: " + e);
136+
logger.log(Level.FINEST, "Failed to export " + type + "s. Details follow:", e);
137137
}
138138
result.failExceptionally(FailedExportException.grpcFailedExceptionally(e));
139139
}

0 commit comments

Comments
 (0)