Skip to content

Commit 7454852

Browse files
fix: LoggingSpanExporter and LoggingMetricExporter flush() always returns success
LoggingSpanExporter.flush() and LoggingMetricExporter.flush() unconditionally return success even if underlying handlers fail. This masks errors from the caller. Fixes #8360
1 parent 1b207c6 commit 7454852

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

exporters/logging/src/main/java/io/opentelemetry/exporter/logging/LoggingMetricExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public CompletableResultCode flush() {
9292
return resultCode.fail();
9393
}
9494
}
95-
return resultCode.succeed();
95+
return resultCode;
9696
}
9797

9898
@Override

exporters/logging/src/main/java/io/opentelemetry/exporter/logging/LoggingSpanExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public CompletableResultCode flush() {
8282
resultCode.fail();
8383
}
8484
}
85-
return resultCode.succeed();
85+
return resultCode;
8686
}
8787

8888
@Override

0 commit comments

Comments
 (0)