I just noticed some HUGE documents in the Kibana logs from APM. The message field (not indexed) is ~4MB, and appears to be duplicated in error.message...
I’ve also noticed Discover complaining about async results > 10MB or something, not showing me the docs (but showing the graphs), thinking this could be the culprit.
Here’s the start of one of the messages: Invalid value "globalThis.$localize=Object.assign(globalThis.$localize ||
When somebody attempts to POST /api/apm/sourcemaps and the request fails, the error message will show in the Kibana logs:
This error message comes from io-ts, and in this example the ... is the whole sourcemap which can be quite large. The sourcemap should not be printed to the logs.
By default io-ts has very ugly error messages that aren't helpful to end users. However, the scope of this issue is only to solve the problem of very large log output. Any other improvements to the error message output are optional benefits.
✔️ Acceptance critieria
When a POST to /api/apm/sourcemaps fails because of failing io-ts validation, the contents of the sourcemap document are not logged.
From internal Slack:
When somebody attempts to
POST /api/apm/sourcemaps
and the request fails, the error message will show in the Kibana logs:This error message comes from io-ts, and in this example the
...
is the whole sourcemap which can be quite large. The sourcemap should not be printed to the logs.By default io-ts has very ugly error messages that aren't helpful to end users. However, the scope of this issue is only to solve the problem of very large log output. Any other improvements to the error message output are optional benefits.
✔️ Acceptance critieria