Skip to content

Commit 3bbea6b

Browse files
Adds a stack-trace to failures from OpenSearch to help with debugging issues. (#1899) (#1902)
Signed-off-by: David Venable <[email protected]> (cherry picked from commit bd8a7fa) Co-authored-by: David Venable <[email protected]>
1 parent 6f1c607 commit 3bbea6b

File tree

1 file changed

+2
-2
lines changed
  • data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch

1 file changed

+2
-2
lines changed

data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSink.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ private void logFailure(final BulkOperation bulkOperation, final Throwable failu
219219
dlqWriter.write(String.format("{\"Document\": [%s], \"failure\": %s}\n",
220220
BulkOperationWriter.bulkOperationToString(bulkOperation), failure.getMessage()));
221221
} catch (final IOException e) {
222-
LOG.error("DLQ failed for Document [{}]", bulkOperation.toString());
222+
LOG.error("DLQ failed for Document [{}]", bulkOperation, e);
223223
}
224224
} else {
225-
LOG.warn("Document [{}] has failure: {}", bulkOperation.toString(), failure);
225+
LOG.warn("Document [{}] has failure.", bulkOperation.toString(), failure);
226226
}
227227
}
228228

0 commit comments

Comments
 (0)