# Log Processing rule limit of line lenght?

**URL:** <https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846>\
**Category:** OpenTelemetry\
**Tags:** opentelemetry, dpl\
**Created:** [November 27, 2023, 9:30am UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846 "2023-11-27T09:30:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [November 27, 2023, 9:30am UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846/1 "2023-11-27T09:30:06Z")

</div>

Has anyone noticed this:  
I create a log processing rule to remove parts of the content and only keep relevant data (remove everything after the ‘[ERROR]’ and store it in a new field “message”

The rule works fine when tested, but when applied at runtime it cuts off parts of the content.

 ![r_weber_0-1701075702160.png](https://global.discourse-cdn.com/dynatrace/original/2X/c/cf30e1609290099e143f20d9ae96aafd000a2fc0.png)

Here, querying Grail after the processing has been applied (note the cut off “message” field):

 ![r_weber_1-1701075829188.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/ede3be804453eb0a67bf3ccf75673a5f0cd4b6f8.png)

Are there any settings/limit I should be aware of for such cleanup rules?

---

<div class="post-metadata">

**Author:** ![sinisa\_zubic](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sinisa_zubic/32/32498_2.png) [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Post date:** [November 29, 2023, 6:24pm UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846/2 "2023-11-29T18:24:03Z")

</div>

Hi&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901)

the LD matcher matches per default the first [4096 characters until the next line break](https://docs.dynatrace.com/docs/shortlink/dpl-lines-strings#line-data). You might have some wired line break. therefore I would suggest to go with the DATA matcher and specify a higher character limit.

But I would suggest that you try the pattern first in notebooks and see if it works the same way as in the processing definition.

```markup
fetch logs
| filter <your custom filter for the relevant records>
| parse content, """LD
TIMESTAMP('yyyy-mm-dd HH:mm:ss +S', locale='de') 
LD ('[Error]'|'[Warning]') 
DATA:message"""

```

Best,  
Sini

---

<div class="post-metadata">

**Author:** ![GerardJ](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gerardj/32/154_2.png) [@GerardJ](https://community.dynatrace.com/u/GerardJ)\
**Post date:** [December 14, 2023, 7:44am UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846/3 "2023-12-14T07:44:04Z")

</div>

Hello&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901)

I’ve seen the same behavior with a processing rule that parses a JSON. When I test the rules everything is Ok, but when log is processed, the extracted field seems to be limited to 250 characters.  
Have you find any information or a solution ?

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [December 14, 2023, 9:51am UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846/4 "2023-12-14T09:51:10Z")

</div>

Hi&nbsp;[@GerardJ](https://community.dynatrace.com/user/66575)&nbsp;,

I solved it as&nbsp;[@sinisa\_zubic](https://community.dynatrace.com/user/38283)&nbsp;suggested by adding a quantifier to the DATA / LD matcher like this:

```markup
USING(INOUT content:STRING) | 
PARSE(content, "
  LD
  TIMESTAMP('yyyy-mm-dd HH:mm:ss +S', locale='de')
  LD
  ('[Error]'|'[Warning]')
  DATA{1,8192}:content
")

```

Hope that helps,  
Reinhard

---

<div class="post-metadata">

**Author:** ![sabrina\_montlu1](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sabrina\_montlu1](https://community.dynatrace.com/u/sabrina_montlu1)\
**Post date:** [March 28, 2025, 9:35am UTC](https://community.dynatrace.com/t/log-processing-rule-limit-of-line-lenght/42846/5 "2025-03-28T09:35:45Z")

</div>

Hi, thank you it help me for my case :)!
