<?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: Distributed tracing doesn’t work in RUM application in Real User Monitoring</title>
    <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243963#M5936</link>
    <description>&lt;P&gt;But the &lt;STRONG&gt;CORS&lt;/STRONG&gt; error will show up only when &lt;STRONG&gt;x-dtc&lt;/STRONG&gt; header is added so in my opinion regex in&amp;nbsp;&lt;STRONG&gt;Link cross-origin XHR actions and their distributed traces&amp;nbsp;&lt;/STRONG&gt;doesn't work because&amp;nbsp;&lt;STRONG&gt;x-dtc &lt;/STRONG&gt;header isn't added&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 12:46:27 GMT</pubDate>
    <dc:creator>KamilA</dc:creator>
    <dc:date>2024-04-25T12:46:27Z</dc:date>
    <item>
      <title>Enable Distributed Tracing for Dynatrace RUM Applications</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/242650#M5888</link>
      <description>&lt;P&gt;&lt;EM&gt;Summary:&amp;nbsp;This post explains why distributed tracing may not appear for a RUM application. It covers requirements such as backend service detection, propagation headers, and where data will or will not show up in Dynatrace.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our problem:&lt;/P&gt;
&lt;P&gt;HTTP errors handled by the Dynatrace web application don’t have an assigned service, so we are not able to see distributed tracing&lt;/P&gt;
&lt;P&gt;State of the matter is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We have defined a web application in Dynatrace using the agentless RUM option (Injection format:&lt;STRONG&gt; JavaScript tag&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;The frontend application is developed in Angular v17&lt;/LI&gt;
&lt;LI&gt;Frontend communicates with backend via Apigee proxy and Istio, it looks like: HTPP request from Frontend app -&amp;gt; apigee proxy -&amp;gt; Istio -&amp;gt; backend service&lt;/LI&gt;
&lt;LI&gt;Our one Dynatrace web application monitors 2 environments (test, prod), app URLs look like: &lt;A class="" title="https://app.test.group.example.com/" href="https://app.test.group.example.com" target="_blank" rel="noreferrer noopener"&gt;https://app.test.group.example.com&lt;/A&gt; &lt;A class="" title="https://app.group.example.com/" href="https://app.group.example.com" target="_blank" rel="noreferrer noopener"&gt;https://app.group.example.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;The frontend app is hosted on Amazon CloudFront&lt;/LI&gt;
&lt;LI&gt;Our frontend app calls the backend via Apigee proxy, api urls look like &lt;A class="" title="https://api-test.example.com/" href="https://api-test.example.com" target="_blank" rel="noreferrer noopener"&gt;https://api-test.example.com&lt;/A&gt; &lt;A class="" title="https://api.example.com/" href="https://api.example.com" target="_blank" rel="noreferrer noopener"&gt;https://api.example.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;For backend, we have a separate service in Dynatrace for the test and prod environments&lt;/LI&gt;
&lt;LI&gt;Cookies are included in XHR calls (we checked and backend service receives Dynatrace cookies send from frontend)&lt;/LI&gt;
&lt;LI&gt;We checked and &lt;STRONG&gt;x-dtc&lt;/STRONG&gt; header isn’t set when we have&lt;STRONG&gt; (https:\/\/)?[a-z|-]*\.example\.com\/?\S*&lt;/STRONG&gt; regex in “&lt;STRONG&gt;Link cross-origin XHR actions and their distributed trace&lt;/STRONG&gt;s” option&lt;/LI&gt;
&lt;LI&gt;In frontend Dynatrace web application we have defined request error rules and &lt;STRONG&gt;HTTP 400-499&lt;/STRONG&gt; and &lt;STRONG&gt;500-599&lt;/STRONG&gt; errors are captured, they impact Apdex and are considered for Davis&lt;/LI&gt;
&lt;LI&gt;Our Angular interceptor responsible for capturing HTTP errors using &lt;STRONG&gt;Dynatrace JavaScript API:&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;intercept(req: HttpRequest&amp;lt;unknown&amp;gt;, next: HttpHandler): Observable&amp;lt;HttpEvent&amp;lt;unknown&amp;gt;&amp;gt; {
    if (!window.dtrum) {
        return next.handle(req);
    }

    const xhrActionId: number = window.dtrum?.enterXhrAction(`HTTP ${req.method} request`, 1, req.url);

    return next.handle(req).pipe(
        tap({
            next: (): void =&amp;gt; {},
            error: (error: HttpErrorResponse): void =&amp;gt; {
                window.dtrum?.markXHRFailed(error.status, error.message, xhrActionId);
            }
        }),
        finalize((): void =&amp;gt; {
            window?.dtrum?.leaveXhrAction(xhrActionId);
        })
    );&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In Dynatrace web application settings we have:
&lt;UL&gt;
&lt;LI&gt;In &lt;STRONG&gt;Capturing -&amp;gt; Async web requests and SPAs&lt;/STRONG&gt; section: &lt;STRONG&gt;Angular&amp;nbsp;&lt;/STRONG&gt;toggle is off and &lt;STRONG&gt;Capture XmlHttpRequest (XHR), Use Proxy API for XHRs, Capture fetch() requests &lt;/STRONG&gt;toggles are on&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Capturing -&amp;gt; Custom configuration properties&lt;/STRONG&gt; section we have &lt;STRONG&gt;cce=1&lt;/STRONG&gt; custom configuration property added&lt;/LI&gt;
&lt;LI&gt;Page group detection is default&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Capturing -&amp;gt; Content capture&lt;/STRONG&gt; section all toggles are on&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Our backend services are monitored by OneAgent, developed using Spring boot 3.2.2 and Java 21, deployed on AWS using Kubernetes&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;What did we miss that distributed tracing doesn't work for our RUM application?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 11:12:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/242650#M5888</guid>
      <dc:creator>KamilA</dc:creator>
      <dc:date>2026-01-27T11:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing doesn’t work in RUM application</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243322#M5913</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/70734"&gt;@KamilA&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;In certain cases, if you use agentless and if you activate cross-origin, it may be necessary to pass the x-dtc header into CORS in order to be able to link user actions (or errors) to backend traces.&lt;/P&gt;&lt;P&gt;documentation link :&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/initial-setup/link-cross-origin-xhrs" target="_blank" rel="noopener noreferrer"&gt;https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/initial-setup/l...&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 13:47:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243322#M5913</guid>
      <dc:creator>gbaudart</dc:creator>
      <dc:date>2024-04-19T13:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing doesn’t work in RUM application</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243653#M5927</link>
      <description>&lt;P&gt;I've configured&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;Access-Control-Allow-Headers: x-dtc&lt;/STRONG&gt; header but still &lt;STRONG&gt;x-dtc&lt;/STRONG&gt; header isn't set. Should it be added automatically by JavaScript API? Am I right?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 07:19:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243653#M5927</guid>
      <dc:creator>KamilA</dc:creator>
      <dc:date>2024-04-23T07:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing doesn’t work in RUM application</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243657#M5928</link>
      <description>&lt;P&gt;Oui, mais il faut veiller à l'autoriser dans le CORS (peut-être sur API Gateway par exemple).&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 07:42:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243657#M5928</guid>
      <dc:creator>gbaudart</dc:creator>
      <dc:date>2024-04-23T07:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing doesn’t work in RUM application</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243963#M5936</link>
      <description>&lt;P&gt;But the &lt;STRONG&gt;CORS&lt;/STRONG&gt; error will show up only when &lt;STRONG&gt;x-dtc&lt;/STRONG&gt; header is added so in my opinion regex in&amp;nbsp;&lt;STRONG&gt;Link cross-origin XHR actions and their distributed traces&amp;nbsp;&lt;/STRONG&gt;doesn't work because&amp;nbsp;&lt;STRONG&gt;x-dtc &lt;/STRONG&gt;header isn't added&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 12:46:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Enable-Distributed-Tracing-for-Dynatrace-RUM-Applications/m-p/243963#M5936</guid>
      <dc:creator>KamilA</dc:creator>
      <dc:date>2024-04-25T12:46:27Z</dc:date>
    </item>
  </channel>
</rss>

