<?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: Dynatrace Instrument mobile apps with Expo-Router in Real User Monitoring</title>
    <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259513#M6346</link>
    <description>&lt;P&gt;I start to believe this a MacOS issue, because I tested Android on my Windows machine and it works. I observed basically the same thing as you. I debugged our transformer and looked at input files apart from node_modules and saw the same&amp;nbsp;&lt;SPAN&gt;`../../../../../../../app. Because of this it is not resolving any other application files. Android on Windows is resolving everything correctly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So probably I will have a look today how EXPO_ROUTER_APP_ROOT is defined on Mac when going the default way, to understand why our plugin is interfering here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the great collaboration!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 06:55:58 GMT</pubDate>
    <dc:creator>matthias_hochri</dc:creator>
    <dc:date>2024-10-17T06:55:58Z</dc:date>
    <item>
      <title>Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259099#M6314</link>
      <description>&lt;P&gt;Hey Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are creating a React native application using Expo and&amp;nbsp;&lt;A href="https://www.npmjs.com/package/expo-router" target="_self"&gt;expo-router&lt;/A&gt;. When trying to do the auto-instrumentation the application is loading, BUT expo is telling us that there is no route set to start from.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried looking for some documentation or known issues regarding expo-router but we were not able to find any. If you know more regarding the issue we encounter, the usage of Dynatrace in combination with expo-router or would need a more detailed description, feel free to comment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simon&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 09:14:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259099#M6314</guid>
      <dc:creator>Simon_kbs</dc:creator>
      <dc:date>2024-10-14T09:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259117#M6317</link>
      <description>&lt;P&gt;Hi Simon, we observed some issues in the past. I checked out the expo example:&amp;nbsp;&lt;A href="https://github.com/expo/expo/tree/main/templates/expo-template-tabs" target="_blank"&gt;https://github.com/expo/expo/tree/main/templates/expo-template-tabs&lt;/A&gt;&amp;nbsp;and tested with this and it worked for me. Did you do a prebuild with expo so the Android and iOS folder are created?&lt;/P&gt;&lt;P&gt;We also have an ongoing support case where we observed problems with metro.config.js. I used the following lines:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const {getDefaultConfig} = require('expo/metro-config');
const config = getDefaultConfig(__dirname);

config.transformer.babelTransformerPath = require.resolve(
  '@dynatrace/react-native-plugin/lib/dynatrace-transformer',
);

config.reporter = require('@dynatrace/react-native-plugin/lib/dynatrace-reporter');

module.exports = config;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please confirm if this helps your situation.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 11:24:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259117#M6317</guid>
      <dc:creator>matthias_hochri</dc:creator>
      <dc:date>2024-10-14T11:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259175#M6318</link>
      <description>&lt;P&gt;Hi Matthias, thanks for looking into it. So we've tried the following steps from a fresh repo:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;install dynatrace plugin.&lt;/LI&gt;&lt;LI&gt;Add our &lt;FONT color="#FF0000"&gt;dynatrace.config.js&lt;/FONT&gt; downloaded from the dynatrace portal.&lt;/LI&gt;&lt;LI&gt;Setup metro:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const {getDefaultConfig} = require('expo/metro-config');
const config = getDefaultConfig(__dirname);

config.transformer.babelTransformerPath = require.resolve(
  '@dynatrace/react-native-plugin/lib/dynatrace-transformer',
);

config.reporter = require('@dynatrace/react-native-plugin/lib/dynatrace-reporter');

module.exports = config;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Setup babel&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;module.exports = {
  presets: [
    [
      "babel-preset-expo",
      {
        jsxRuntime: "automatic",
        jsxImportSource: "@dynatrace/react-native-plugin",
      },
    ],
  ],
};​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="andale mono,times" color="#FF0000"&gt;npx expo prebuild&lt;/FONT&gt; which create the ios and android directories.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times" color="#FF0000"&gt;npx instrumentDynatrace plist=./ios/&amp;lt;project&amp;gt;/Info.plist&lt;/FONT&gt; as the cmd could not find the .plist file&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times" color="#FF0000"&gt;npx expo run:ios&lt;/FONT&gt; or &lt;FONT face="andale mono,times" color="#FF0000"&gt;npx expo run:android&lt;/FONT&gt; which result in the following:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We do see logs from dynatrace but on opening the application we do not land on our application and instead see the expo welcome screen.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon_kbs_0-1728916006119.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23617iC7E5F1CE53AFBFAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon_kbs_0-1728916006119.png" alt="Simon_kbs_0-1728916006119.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 15:15:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259175#M6318</guid>
      <dc:creator>Simon_kbs</dc:creator>
      <dc:date>2024-10-14T15:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259238#M6319</link>
      <description>&lt;P&gt;Thanks for your input. By fresh repo you mean your own repo or did you try the official example listed above? If you are talking about your application we probably should switch to a official support case as it takes too long in here to analyze individual files.&lt;/P&gt;&lt;P&gt;Your whole instructions seem to be quite alright. At least I did it pretty much the same. Only thing that I can see as a small difference is that never expo version have a slightly changed babel.config.js (Using api.cache):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;module.exports = function (api) {
  api.cache(true);
  return {
    presets: [
      ['babel-preset-expo',
        {
          jsxRuntime: 'automatic',
          jsxImportSource: '@dynatrace/react-native-plugin',
        },
      ],
    ],
  };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not sure if this will make a difference as api.cache only caches the configuration used by babel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 05:10:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259238#M6319</guid>
      <dc:creator>matthias_hochri</dc:creator>
      <dc:date>2024-10-15T05:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259434#M6338</link>
      <description>&lt;P&gt;Hey Matthias. Thank you for you support. I am working with Simon. We did actually try from the same tabs template with and without clearing api cache but without success. I created a repo that illustrate the issue&amp;nbsp;&lt;A href="https://github.com/velcrin/dynatrace-expo-router" target="_blank" rel="noopener"&gt;https://github.com/velcrin/dynatrace-expo-router&lt;/A&gt;. `main` branch is the original expo-template-tabs without any modification. It just works out of the box. The `add-dynatrace` branch is the branch were we did the setup (without `dynatrace.config.js` that we just ignored to commit). You can see the changes we made in the PR&amp;nbsp;&lt;A href="https://github.com/velcrin/dynatrace-expo-router/pull/1/files" target="_blank" rel="noopener"&gt;https://github.com/velcrin/dynatrace-expo-router/pull/1/files&lt;/A&gt;.&amp;nbsp; Starting the application result in the default black expo welcome screen but should actually show the tabs demo app from the template. I'd be curious to hear if you get this working on your side.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 08:35:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259434#M6338</guid>
      <dc:creator>Velcrin</dc:creator>
      <dc:date>2024-10-16T08:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259443#M6341</link>
      <description>&lt;P&gt;Thanks for the repo. I tested and it works. I know what's the difference. My test was on Android, yours on iOS. I will check on my MacBook next and see what happens there.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 09:00:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259443#M6341</guid>
      <dc:creator>matthias_hochri</dc:creator>
      <dc:date>2024-10-16T09:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259491#M6345</link>
      <description>&lt;P data-unlink="true"&gt;Android and iOS are failing for me actually. After further investigation it seems that the plugin is interfering with expo-router path used to find routes. Before using the dynatrace plugin the value of&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;EXPO_ROUTER_APP_ROOT&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;is `../../app` although after applying the plugin the value is `../../../../../../../app`. Not sure what is happening. It would be interesting to debug the plugin as well. Adding an `index.js` file like described here&amp;nbsp;&lt;A href="https://docs.expo.dev/router/reference/troubleshooting/" target="_blank" rel="noopener"&gt;https://docs.expo.dev/router/reference/troubleshooting/&lt;/A&gt;&amp;nbsp;seems to fix it. I am not exactly sure what are the implications of that change though. Anyway, fix can be tested on&amp;nbsp;&lt;A href="https://github.com/velcrin/dynatrace-expo-router/pull/2/files" target="_blank" rel="noopener"&gt;https://github.com/velcrin/dynatrace-expo-router/pull/2/files&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 15:11:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259491#M6345</guid>
      <dc:creator>Velcrin</dc:creator>
      <dc:date>2024-10-16T15:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259513#M6346</link>
      <description>&lt;P&gt;I start to believe this a MacOS issue, because I tested Android on my Windows machine and it works. I observed basically the same thing as you. I debugged our transformer and looked at input files apart from node_modules and saw the same&amp;nbsp;&lt;SPAN&gt;`../../../../../../../app. Because of this it is not resolving any other application files. Android on Windows is resolving everything correctly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So probably I will have a look today how EXPO_ROUTER_APP_ROOT is defined on Mac when going the default way, to understand why our plugin is interfering here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the great collaboration!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 06:55:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259513#M6346</guid>
      <dc:creator>matthias_hochri</dc:creator>
      <dc:date>2024-10-17T06:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259676#M6363</link>
      <description>&lt;P&gt;Okay. I found the reason. I somehow tricked myself that's why I was telling you that Android works on my Windows machine. Turns out I found the solution while setting up the Windows project manually but I forgot about this detail.&lt;/P&gt;&lt;P&gt;On my Mac machine I basically debugged through the whole process to find the issue, which was the babel transformer not being called. When I looked back to my Windows Android project, it turned out that I was already using this. Following line needs to be used in our dynatrace.config.js to use the babel transformer of expo:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;upstreamTransformer&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;require&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;resolve&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'@expo/metro-config/babel-transformer'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I will update our internal documentation about this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Oct 2024 10:01:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259676#M6363</guid>
      <dc:creator>matthias_hochri</dc:creator>
      <dc:date>2024-10-18T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Instrument mobile apps with Expo-Router</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259727#M6365</link>
      <description>&lt;P&gt;Works like a charm! I just tried on both the dummy github project and our own. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 12:54:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/Dynatrace-Instrument-mobile-apps-with-Expo-Router/m-p/259727#M6365</guid>
      <dc:creator>Velcrin</dc:creator>
      <dc:date>2024-10-18T12:54:32Z</dc:date>
    </item>
  </channel>
</rss>

