-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dead letter index: align error field to ECS and do not forward retrya…
…ble errors (#793) This PR brings the following changes: - Align the `error` field in documents sent to the dead letter index (DLI) to the ECS format; the field now provides `error.message` and `error.type`. - Add the `http.response.status_code` field - Limit the error type sent to the DLI; do not send Elasticsearch client errors that: - are connection errors (do not have an `http.response.status_code`) - have a retriable status code (for example, 429) Here is a sample error document from a mapping conflict: ```json { "@timestamp": "2024-10-07T05:57:59.448925Z", "message": "{\"hey\":{\"message\":\"hey there\"},\"_id\":\"e6542822-4583-438d-9b4d-1a3023b5eeb9\",\"_op_type\":\"create\",\"_index\":\"logs-succeed.pr793-default\"}", "error": { "message": "[1:30] failed to parse field [hey] of type [keyword] in document with id 'e6542822-4583-438d-9b4d-1a3023b5eeb9'. Preview of field's value: '{message=hey there}'", "type": "document_parsing_exception" }, "http": { "response": { "status_code": 400 } } } ``` - The error field must always match the definition of the ECS error field. - Avoid sending connection-related errors to DLI. - Avoid sending errors with retryable status codes to DLI.
- Loading branch information
1 parent
d39cad4
commit 96fb54e
Showing
4 changed files
with
285 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.