elastic / elastic/apm-agent-nodejs

`captureBody` docs have incorrect truncation information

Open
#3,005 1 comment 0 reactions 0 assignees View on GitHub
8.10-candidate agent-nodejs docs
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.