Commit 7d81074
authored
Log bulk request response body on error, not just when debug logging is set (#1096)
Prior to this commit, an error response to a bulk request would only log the
response body when debug logging is enabled. This removes an important piece
of information when tracking down issues, which is particularly important in
this case, as an error response to a bulk request may result in requests being
retried indefinitely, causing pipeline stalls.
This commit adds the response body to the `log_hash` regardless of the log
level,so 429 responses will remain unchanged, and will only log when debug is
enabled, but other error responses will include the response body to add this
additional context to help track down issues
Closes: #9991 parent 7c24cfa commit 7d81074
File tree
3 files changed
+6
-3
lines changed- lib/logstash/plugin_mixins/elasticsearch
3 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
| 338 | + | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments