# Split logs that are ingested via API

**URL:** <https://community.dynatrace.com/t/split-logs-that-are-ingested-via-api/52386>\
**Category:** Logs\
**Tags:** openpipeline, log-processing, logs\
**Created:** [July 7, 2025, 2:19pm UTC](https://community.dynatrace.com/t/split-logs-that-are-ingested-via-api/52386 "2025-07-07T14:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reshef](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@reshef](https://community.dynatrace.com/u/reshef)\
**Post date:** [July 7, 2025, 2:19pm UTC](https://community.dynatrace.com/t/split-logs-that-are-ingested-via-api/52386/1 "2025-07-07T14:19:07Z")

</div>

We recently set up log forwarding to Dynatrace Api via logstash.

In logstash we can see these responses from Dynatrace Api:

```markup
body=>"{\"success\":{\"code\":200,\"message\":\"Some events were limited. Following limits were applied: Log Event attribute value size is too large, will be truncated.\"}}"

```

We can see in Dynatrace that content of the logs ingested via logstash is indeed huge, but it turns out it’s due to the fact that **each log record contains multiple logs records merged inside it** (see attached log content with 15 merged logs). Moreover, I suspect that the reason almost no field extracted for these logs in Dynatrace have been caused by this issue.

Is there a way to split the logs records? I noticed there is a setting for splitting logs which are ingested with OneAgent but I haven’t found how to do this option with other logs.

Thanks!

 ![log content.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/60a0ab57fe3bde1691f9ef53e2b1556ca0d7b400.png)  
 ![logs.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/2/5288999f537ab7675012f5a202cfea5d358661e6.png)

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [July 9, 2025, 10:28pm UTC](https://community.dynatrace.com/t/split-logs-that-are-ingested-via-api/52386/2 "2025-07-09T22:28:24Z")

</div>

The ingest endpoint on Dynatrace SaaS supports receiving multiple events in a single payload if JSON us used, but the format has to match what the API is expecting. I believe it has to come in as an array of JSON objects in order for the events to automatically be split. Reference is available [here](https://docs.dynatrace.com/docs/shortlink/api-log-monitoring-v2-post-ingest#request-body-json-model).

For plain text format events, only a single event is supported per API call. In this case, logstash would need to be adjusted to not send multiple log events in a single API call.

---

<div class="post-metadata">

**Author:** ![reshef](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@reshef](https://community.dynatrace.com/u/reshef)\
**Post date:** [September 8, 2025, 10:37am UTC](https://community.dynatrace.com/t/split-logs-that-are-ingested-via-api/52386/3 "2025-09-08T10:37:15Z")

</div>

It’s been a long time since I wrote this message, but I just wanted to give the full solution for future generations.  
[@marco\_irmer](https://community.dynatrace.com/user/19769)&nbsp;you are right, processing from this kind need to be done on Logstash with the help of plugins. Specifically, splitting records can be achieved with [split plugin](https://www.elastic.co/docs/reference/logstash/plugins/plugins-filters-split).
