<?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>topic Re: How to Replace certain part of URL in a log content in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274945#M1928</link>
    <description>&lt;P&gt;if you have some sort of pattern for these URLs you can identify them using dpl and replace them even if there's some slight differences you can use the or operator to pick one variant&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example if we have these 3 patterns :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/v1/agreements/12345678/vins/xx123456KL456/validate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;URL:&amp;nbsp;/v1/agreements1/12345678/vins/xx123456KL456/validate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;URL:&amp;nbsp;/v1/agreements2/12345678/vins/xx123456KL456/validate&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data record(content="URL: /v1/agreements/12345678/vins/xx123456KL456/validate"),
record(content="URL: /v1/agreements1/12345678/vins/xx123456KL456/validate"),
record(content="URL: /v1/agreements2/12345678/vins/xx123456KL456/validate")
| fieldsAdd content = replacePattern(content, "('agreements/' | 'agreements1/' | 'agreements2/') ld '/'", "agreements/***/")
| fieldsAdd content = replacePattern(content, "'vins/' ld '/'", "vins/***/")&lt;/LI-CODE&gt;&lt;P&gt;you can make them in a single line of code but then it will be more sensitive to any pattern change&lt;/P&gt;</description>
    <pubDate>Fri, 11 Apr 2025 08:05:01 GMT</pubDate>
    <dc:creator>Mohammed-Samy</dc:creator>
    <dc:date>2025-04-11T08:05:01Z</dc:date>
    <item>
      <title>How to Replace certain part of URL in a log content</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/273062#M1836</link>
      <description>&lt;P&gt;I have a log content like this :&lt;/P&gt;&lt;P&gt;URL: &lt;SPAN&gt;/v1/agreements/12345678/vins/xx123456KL456/validate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I replace the 3rd and 5th portion so that for all vins and agreements # dynatrace treat them as same url ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:45:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/273062#M1836</guid>
      <dc:creator>susmita_k</dc:creator>
      <dc:date>2025-03-20T14:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace certain part of URL in a log content</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/273236#M1844</link>
      <description>&lt;P&gt;I would recommend using the DPL architect after clicking on this specific field and choosing extract. This will allow you to parse the information and then represent it in a new field.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here are the docs on this,&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-pattern-language/dpl-architect" target="_blank"&gt;DPL Architect — Dynatrace Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 20:29:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/273236#M1844</guid>
      <dc:creator>KeeganNelson</dc:creator>
      <dc:date>2025-03-21T20:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace certain part of URL in a log content</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274339#M1891</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67050"&gt;@susmita_k&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can try the DQL replace pattern&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data record(content="URL: /v1/agreements/12345678/vins/xx123456KL456/validate")
| fieldsAdd content = replacePattern(content, "'agreements/' ld '/'", "agreements/***/")
| fieldsAdd content = replacePattern(content, "'vins/' ld '/'", "vins/***/")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Output :&amp;nbsp;&lt;SPAN&gt;URL: /v1/agreements/***/vins/***/validate&lt;BR /&gt;&lt;BR /&gt;here's the documentation reference:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/functions/string-functions#replacePattern" target="_self"&gt;replacePattern&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 12:23:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274339#M1891</guid>
      <dc:creator>Mohammed-Samy</dc:creator>
      <dc:date>2025-04-03T12:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace certain part of URL in a log content</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274798#M1924</link>
      <description>&lt;P&gt;I have multiple type of urls and i would like to do it dynamically.. also, when I do it, I dont want it to update the v1 or v2s present in the url. while replacepattern is working, but not able to do it for all type of url with single line of code.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 17:40:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274798#M1924</guid>
      <dc:creator>susmita_k</dc:creator>
      <dc:date>2025-04-09T17:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Replace certain part of URL in a log content</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274945#M1928</link>
      <description>&lt;P&gt;if you have some sort of pattern for these URLs you can identify them using dpl and replace them even if there's some slight differences you can use the or operator to pick one variant&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example if we have these 3 patterns :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/v1/agreements/12345678/vins/xx123456KL456/validate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;URL:&amp;nbsp;/v1/agreements1/12345678/vins/xx123456KL456/validate&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;URL:&amp;nbsp;/v1/agreements2/12345678/vins/xx123456KL456/validate&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data record(content="URL: /v1/agreements/12345678/vins/xx123456KL456/validate"),
record(content="URL: /v1/agreements1/12345678/vins/xx123456KL456/validate"),
record(content="URL: /v1/agreements2/12345678/vins/xx123456KL456/validate")
| fieldsAdd content = replacePattern(content, "('agreements/' | 'agreements1/' | 'agreements2/') ld '/'", "agreements/***/")
| fieldsAdd content = replacePattern(content, "'vins/' ld '/'", "vins/***/")&lt;/LI-CODE&gt;&lt;P&gt;you can make them in a single line of code but then it will be more sensitive to any pattern change&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 08:05:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-Replace-certain-part-of-URL-in-a-log-content/m-p/274945#M1928</guid>
      <dc:creator>Mohammed-Samy</dc:creator>
      <dc:date>2025-04-11T08:05:01Z</dc:date>
    </item>
  </channel>
</rss>

