elastic / elastic/apm-agent-nodejs
`captureBody` docs have incorrect truncation information
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#capture-body docs say:
> The recorded body will be truncated if larger than 2 KiB.
I believe this is wrong. When `longFieldMaxLength` (https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#long-field-max-length) was added, truncation of `transaction.context.request.body` (the field populated by `captureBody`) is truncated by `longFieldMaxLength`, which is 10k chars by default.
This came up in discussion here: https://discuss.elastic.co/t/big-json-payloads-in-elastic-apm/317527/2
(For interest sake, I *think* that before the longFieldMaxLength, the captured body might not have been truncated at *all*. I'm curious if that was the case, or if it was truncated to the default 1024 length I see in the http-client's truncation code. I don't see where the *2* KiB came from.)
Contributor guide
Assessment
This issue has not been assessed yet.