Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture "caused_by" in errors #166

Open
axw opened this issue May 3, 2024 · 0 comments
Open

Capture "caused_by" in errors #166

axw opened this issue May 3, 2024 · 0 comments

Comments

@axw
Copy link
Member

axw commented May 3, 2024

If one attempts to index a very long value in a flattened field, it will cause indexing to fail. This is reported by go-docappender, but the reason for the error is obscured. It will look something like "reason":"[1:40656] failed to parse field [error.exception.stacktrace] of type [flattened] in document with id '5UtbPI8BaMhqs2kExrLc'.. Elasticsearch responds with a preview of the field value, but we strip this off.

The Elasticsearch response would also include "caused_by", which has helpful information about what caused the indexing to fail. In the example scenario above, it would be something like "caused_by":{"type":"illegal_argument_exception","reason":"Flattened field [error.exception.stacktrace] contains one immense field whose keyed encoding is longer than the allowed max length of 32766 bytes. Key length: 17, value length: 121034 for key starting with [vars.request_body]"}.

We should consider logging the cause to assist in debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant