<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Troubleshooting log rotation issues in Log Module in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Troubleshooting-log-rotation-issues-in-Log-Module/ta-p/300207</link>
    <description>&lt;DIV class="standard-markdown grid-cols-1 grid [&amp;amp;_&amp;gt;_*]:min-w-0 gap-3 !gap-3.5"&gt;
&lt;H2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold"&gt;Table of contents&lt;/H2&gt;
&lt;OL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-decimal flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#summary" target="_blank" rel="noopener"&gt;Summary&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#problem" target="_blank" rel="noopener"&gt;Problem&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#resolution" target="_blank" rel="noopener"&gt;Resolution&lt;/A&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#custom-log-source-path-pattern-misconfiguration" target="_blank" rel="noopener"&gt;Custom log source path pattern misconfiguration&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#rotation-with-a-directory-change" target="_blank" rel="noopener"&gt;Rotation with a directory change&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#immediate-compression-after-rotation" target="_blank" rel="noopener"&gt;Immediate compression after rotation&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#file-deleted-before-log-module-reads-all-content" target="_blank" rel="noopener"&gt;File deleted before Log Module reads all content&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#queue-style-log-sources" target="_blank" rel="noopener"&gt;Queue-style log sources&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;&lt;A class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href="#whats-next" target="_blank" rel="noopener"&gt;What's next&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;
&lt;H2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold"&gt;Summary&lt;/H2&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;This article helps you troubleshoot log rotation issues that prevent Log module from correctly ingesting your log files. It applies to Log module deployed via OneAgent or Dynatrace Operator on both SaaS and Managed environments, and covers file-based logs on Linux and Windows.&lt;/P&gt;
&lt;H2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold"&gt;Problem&lt;/H2&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Logs from a rotated file are missing, duplicated, or only partially ingested. Common symptoms include:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Rotated files exist on disk but are not ingested by Log module.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The active log file is ingested, but gaps appear at every rotation boundary.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Rotated files are ingested, but the currently active log file is missing.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The tail of a log file is missing at rotation boundaries (the last lines before rotation are absent).&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The same log content appears twice in Dynatrace after rotation.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;Is your rotation scenario supported?&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Use the table below to check whether the rotation behavior you're seeing is supported. If your scenario is listed as unsupported, jump to the corresponding section for guidance or a workaround.&lt;/P&gt;
&lt;DIV class="overflow-x-auto w-full px-2 mb-6"&gt;
&lt;TABLE class="min-w-full border-collapse text-sm leading-[1.7] whitespace-normal"&gt;
&lt;THEAD class="text-left"&gt;
&lt;TR&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Scenario&lt;/TH&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Support&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Index-based rotation (&lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;.1&lt;/CODE&gt;, &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;.2&lt;/CODE&gt;, …)&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Rename-and-replace&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Copy-and-truncate&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Supported (content must not be deleted before the agent reads it)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Rotation identifier in filename (date, counter, GUID with separator)&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Fast rotation on CRI-O&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Rotation with directory change&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; Not supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Immediate compression after rotation&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; Not supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Queue logic (fixed-size file, oldest content removed)&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; Not supported&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Unrecognized rotation identifier&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; Not detected&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;H2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold"&gt;Resolution&lt;/H2&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;Custom log source path pattern misconfiguration&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Rotated files exist on disk but are not ingested by Log module.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The active log file is ingested, but gaps appear at every rotation boundary.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Or the reverse: rotated files are ingested, but the currently active log file is missing.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Cause&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;The custom log source path does not match both the active file and its rotated counterparts. The most common mistake is placing an extra separator character (such as &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;.&lt;/CODE&gt;) before the &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;#&lt;/CODE&gt; wildcard. That separator exists in the rotated filename but not in the active filename, so the pattern matches only one of them.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Files on disk:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Active: &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test.log&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Rotated: &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test.2026.05.07.log&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="overflow-x-auto w-full px-2 mb-6"&gt;
&lt;TABLE class="min-w-full border-collapse text-sm leading-[1.7] whitespace-normal"&gt;
&lt;THEAD class="text-left"&gt;
&lt;TR&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Configured path&lt;/TH&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Matches &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;test.log&lt;/CODE&gt;&lt;/TH&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Matches &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;test.2026.05.07.log&lt;/CODE&gt;&lt;/TH&gt;
&lt;TH class="text-text-100 border-b-0.5 border-border-300/60 py-2 pr-4 align-top font-bold" scope="col"&gt;Result&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test.log&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Active file only; rotated files missed&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test.#.log&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Rotated files only; active file missed&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test#.log&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;/TD&gt;
&lt;TD class="border-b-0.5 border-border-300/30 py-2 pr-4 align-top"&gt;Both active and rotated files ingested&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;In &lt;STRONG&gt;Settings &lt;/STRONG&gt;&amp;gt;&lt;STRONG&gt; Collect and capture &lt;/STRONG&gt;&amp;gt;&lt;STRONG&gt; Log Monitoring &lt;/STRONG&gt;&amp;gt;&lt;STRONG&gt; Custom log sources&lt;/STRONG&gt;, update the custom log source path to remove the separator between the static part of the filename and the &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;#&lt;/CODE&gt; placeholder:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Before: &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test.#.log&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;After: &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;/var/log/app/test#.log&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Changes propagate to the agent within approximately 90 seconds. New rotated files are picked up at the next rotation scan (every 5 minutes for custom log sources).&lt;/P&gt;
&lt;HR /&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;Rotation with a directory change&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The active log file is monitored correctly, but rotated files in a subdirectory or archive folder are not ingested.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Occasionally, the same log content appears twice (duplicate records in Dynatrace).&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Cause (brief)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;The Log Module does not follow files that are moved across directory boundaries during rotation. When a rotation tool moves a rotated file to a different directory, Log module loses track of it. Depending on timing, this can result in either data loss or duplicate ingestion.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Configure your rotation tool to keep all rotated files in the same directory as the active log file.&lt;/P&gt;
&lt;HR /&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;Immediate compression after rotation&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The first rotated file (for example, &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;app.log.1.gz&lt;/CODE&gt;) appears in the directory, but its content is not ingested.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Logs from the period immediately before rotation are missing.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;All subsequent rotated files (&lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;.2&lt;/CODE&gt;, &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;.3&lt;/CODE&gt;, …) also show no ingestion because they are also compressed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Cause (brief)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Log Module cannot read compressed files. This is a known limitation.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Workaround&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Configure your rotation tool to delay compression. Keep rotated files in their uncompressed form long enough for Log module to read them before compression occurs.&lt;/P&gt;
&lt;HR /&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;File deleted before Log module reads all content&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The tail of a log file is missing at rotation boundaries (the last lines before rotation are absent).&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The issue occurs specifically with copy-and-truncate rotation, where the copied file is deleted shortly after it's created.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;On Kubernetes: a Log Module restart combined with fast container log rotation causes the last line of a rotated file to be dropped.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Cause (brief)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;If a file is deleted before Log module finishes reading it, the remaining content is lost. This affects:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Copy-and-truncate rotation, where the rotation script deletes the copied file quickly.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Application restarts that remove and recreate the log file before the agent reads the pre-restart tail.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Fast container log rotation coinciding with a Log Module restart.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Current status&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;This is a known limitation. An improvement is tracked in the product backlog but is not yet available.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Workaround&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Try any of the following:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Increase the delay between file deletion and the next rotation step. For example, add a short &lt;CODE class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]"&gt;sleep&lt;/CODE&gt; in your post-rotation script before cleanup.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;For application restarts, ensure the application flushes its log buffer before exiting, so all content is written before rotation.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Reduce the rotation frequency so the agent has more time to read the file before it is removed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;H3 class="text-text-100 mt-2 -mb-1 text-base font-bold"&gt;Queue-style log sources&lt;/H3&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;The log file size remains approximately constant; old records are continuously overwritten.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Dynatrace shows repeated or shuffled log content from the same source.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Very old timestamps appear in newly ingested records.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Cause&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;Some applications use a circular-buffer approach: the log file has a fixed maximum size, and the oldest content is removed in place as new content is appended. This rotation model is fundamentally not supported by Log Module.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;&lt;STRONG&gt;Workaround&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal leading-[1.7]"&gt;There is no workaround that restores full support for queue-style sources. Consider one of the following:&lt;/P&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;If your application supports an alternative logging mode (for example, standard append-only files with external rotation), switch to that.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;Use the Dynatrace API or an OpenTelemetry Collector to ingest these logs via a custom exporter that handles the circular-buffer semantics.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 class="text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold"&gt;What's next&lt;/H2&gt;
&lt;UL class="[li_&amp;amp;]:mb-0 [li_&amp;amp;]:mt-1 [li_&amp;amp;]:gap-1 [&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3"&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;For missing logs unrelated to rotation, see &lt;EM&gt;Troubleshooting missing logs&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;For ingest delay, see &lt;EM&gt;Troubleshooting log ingest delay&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;For multi-line entries split incorrectly or grouped together, see &lt;EM&gt;Troubleshooting log record boundary detection&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI class="font-claude-response-body whitespace-normal break-words pl-2"&gt;For JSON-specific parsing issues, see &lt;EM&gt;Troubleshooting JSON log parsing&lt;/EM&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Jun 2026 13:13:46 GMT</pubDate>
    <dc:creator>Kacper</dc:creator>
    <dc:date>2026-06-02T13:13:46Z</dc:date>
    <item>
      <title>Troubleshooting log rotation issues in Log Module</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Troubleshooting-log-rotation-issues-in-Log-Module/ta-p/300207</link>
      <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;*&lt;EM&gt;Use a table of contents for longer articles.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;H1&gt;Summary&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Short description of which part of the Dynatrace platform the article refers to and what kind of problem it will help resolve / task it will describe.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Problem&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Provide a precise description of the problem / task to be described.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Troubleshooting steps&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This section can be omitted.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Resolution&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This section can be omitted for ticket‑creation articles.&lt;/EM&gt;&lt;/P&gt;
&lt;H1&gt;What's next&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jun 2026 13:13:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Troubleshooting-log-rotation-issues-in-Log-Module/ta-p/300207</guid>
      <dc:creator>Kacper</dc:creator>
      <dc:date>2026-06-02T13:13:46Z</dc:date>
    </item>
  </channel>
</rss>

