# Json.keys\_under\_root ignored for JSON documents larger than 4096 bytes

**URL:** <https://discuss.elastic.co/t/json-keys-under-root-ignored-for-json-documents-larger-than-4096-bytes/354127>\
**Category:** Elastic Agent\
**Created:** [February 26, 2024, 2:46pm UTC](https://discuss.elastic.co/t/json-keys-under-root-ignored-for-json-documents-larger-than-4096-bytes/354127 "2024-02-26T14:46:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vegard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vegard/32/132086_2.png) [@vegard](https://discuss.elastic.co/u/vegard)\
**Post date:** [February 26, 2024, 2:46pm UTC](https://discuss.elastic.co/t/json-keys-under-root-ignored-for-json-documents-larger-than-4096-bytes/354127/1 "2024-02-26T14:46:38Z")

</div>

Hi, we seem to be hitting a hard limit on our Custom Logs integration for the Elastic Agent, ingesting json logs.

We have the following custom configuration:

```auto
json:
  keys_under_root: true

```

This works fine for all json log lines until the line length reaches 4096 characters. After that the the entire log line is truncated to 4096 bytes and then added to the `message` field. Anybody know where to configure this hard limit?

I've searched around but are not able to find any obvious solutions. I found [this](https://discuss.elastic.co/t/4096-characters-input-limitation-missing-part-of-logs-in-message-field/217522) post, and it seems to be a very similar issue but with no solutions (ours are single-line json documents).

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 25, 2024, 2:47pm UTC](https://discuss.elastic.co/t/json-keys-under-root-ignored-for-json-documents-larger-than-4096-bytes/354127/2 "2024-03-25T14:47:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
