<?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 React Native - Explaining npx instrumentdynatrace in Dynatrace tips</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-tips/React-Native-Explaining-npx-instrumentdynatrace/m-p/273511#M1601</link>
    <description>&lt;H1&gt;React Native - npx instrumentdynatrace&lt;/H1&gt;&lt;P&gt;When using a React Native app, when first setting up Dynatrace for it, you’ll need to run:&lt;/P&gt;&lt;PRE&gt;npx instrumentdynatrace&lt;/PRE&gt;&lt;P&gt;This is not necessarily a one-and-done command.&lt;/P&gt;&lt;H2&gt;What does the command do and when to run it?&lt;/H2&gt;&lt;P&gt;When running the command &lt;EM&gt;npx instrumentdynatrace&lt;/EM&gt;, the command will take the configurations from &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt;, takes each portion (iOS and Android), and copies it to the correct file in their respective OS folders.&lt;/P&gt;&lt;P&gt;You must run this command every time you make any changes to the &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt;. Without using the command, changes will not take affect.&lt;/P&gt;&lt;P&gt;Once you have run the command, you can view the configuration from the &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt; in its respective OS folder:&lt;/P&gt;&lt;H3&gt;For Android:&lt;/H3&gt;&lt;P&gt;You should be able to see the changes in the dyantrace.gradle&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{project name}/node_modules/@dynatrace/react-native-plugin/files/dynatrace.gradle&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-1.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27187i9B3770E541EBF7F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-1.png" alt="npxinstrumentdynatrace-1.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;For iOS:&lt;/H3&gt;&lt;P&gt;You should be able to see the change in the p.list.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{project name}/ios/{project name}/Info.plist&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-2.png" style="width: 915px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27188iC2458E6F36C3048E/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-2.png" alt="npxinstrumentdynatrace-2.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once the command &lt;/SPAN&gt;&lt;EM&gt;npx instrumentdynatrace&lt;/EM&gt;&lt;SPAN&gt; has been ran, you can view the change from the terminal:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you made changes and it was successful:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You should be able to see that for both OSs, that the configuration has been updates&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The green box for Android&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#INFO  [2025-03-20 16:52:25]: Starting Android Instrumentation with Dynatrace!
#INFO  [2025-03-20 16:52:25]: Dynatrace plugin &amp;amp; agent already added to build.gradle
#INFO  [2025-03-20 16:52:25]: Replaced old configuration with current configuration in dynatrace.gradle
#INFO  [2025-03-20 16:52:25]: Finished Android Instrumentation with Dynatrace!&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;The blue box for iOS&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#INFO  [2025-03-20 16:52:25]: Starting iOS Instrumentation with Dynatrace!
#INFO  [2025-03-20 16:52:25]: Generating a new plist as the current plist and dynatrace.config.js iOS properties do not match!
#INFO  [2025-03-20 16:52:25]: Removed old configuration in plist file: /Users/aaron.schultz/MyApplications/Mobile/React Native/ReactNativeSampleApp/ios/ReactNativeSampleApp/Info.plist
#INFO  [2025-03-20 16:52:26]: Updated configuration in plist file: /Users/aaron.schultz/MyApplications/Mobile/React Native/ReactNativeSampleApp/ios/ReactNativeSampleApp/Info.plist&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-3.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27189i77F38A11630B0258/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-3.png" alt="npxinstrumentdynatrace-3.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;If no changes were made to the dynatrace.config.js&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For Android, the gradle file will be written, but since nothing change, the output will be the same.&lt;/P&gt;&lt;P&gt;For iOS, the plugin is aware that the p.list is the same and does not make any further changes to the p.list&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-4.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27190i2E4C7F554F1364F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-4.png" alt="npxinstrumentdynatrace-4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;!--    notionvc: b3b9b179-9d60-42aa-a9ff-ee191e9eeb79    --&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2025 13:19:18 GMT</pubDate>
    <dc:creator>Aaron_Schultz</dc:creator>
    <dc:date>2025-03-28T13:19:18Z</dc:date>
    <item>
      <title>React Native - Explaining npx instrumentdynatrace</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/React-Native-Explaining-npx-instrumentdynatrace/m-p/273511#M1601</link>
      <description>&lt;H1&gt;React Native - npx instrumentdynatrace&lt;/H1&gt;&lt;P&gt;When using a React Native app, when first setting up Dynatrace for it, you’ll need to run:&lt;/P&gt;&lt;PRE&gt;npx instrumentdynatrace&lt;/PRE&gt;&lt;P&gt;This is not necessarily a one-and-done command.&lt;/P&gt;&lt;H2&gt;What does the command do and when to run it?&lt;/H2&gt;&lt;P&gt;When running the command &lt;EM&gt;npx instrumentdynatrace&lt;/EM&gt;, the command will take the configurations from &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt;, takes each portion (iOS and Android), and copies it to the correct file in their respective OS folders.&lt;/P&gt;&lt;P&gt;You must run this command every time you make any changes to the &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt;. Without using the command, changes will not take affect.&lt;/P&gt;&lt;P&gt;Once you have run the command, you can view the configuration from the &lt;STRONG&gt;dynatrace.config.js&lt;/STRONG&gt; in its respective OS folder:&lt;/P&gt;&lt;H3&gt;For Android:&lt;/H3&gt;&lt;P&gt;You should be able to see the changes in the dyantrace.gradle&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{project name}/node_modules/@dynatrace/react-native-plugin/files/dynatrace.gradle&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-1.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27187i9B3770E541EBF7F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-1.png" alt="npxinstrumentdynatrace-1.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;For iOS:&lt;/H3&gt;&lt;P&gt;You should be able to see the change in the p.list.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{project name}/ios/{project name}/Info.plist&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-2.png" style="width: 915px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27188iC2458E6F36C3048E/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-2.png" alt="npxinstrumentdynatrace-2.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once the command &lt;/SPAN&gt;&lt;EM&gt;npx instrumentdynatrace&lt;/EM&gt;&lt;SPAN&gt; has been ran, you can view the change from the terminal:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If you made changes and it was successful:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You should be able to see that for both OSs, that the configuration has been updates&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The green box for Android&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#INFO  [2025-03-20 16:52:25]: Starting Android Instrumentation with Dynatrace!
#INFO  [2025-03-20 16:52:25]: Dynatrace plugin &amp;amp; agent already added to build.gradle
#INFO  [2025-03-20 16:52:25]: Replaced old configuration with current configuration in dynatrace.gradle
#INFO  [2025-03-20 16:52:25]: Finished Android Instrumentation with Dynatrace!&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;The blue box for iOS&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#INFO  [2025-03-20 16:52:25]: Starting iOS Instrumentation with Dynatrace!
#INFO  [2025-03-20 16:52:25]: Generating a new plist as the current plist and dynatrace.config.js iOS properties do not match!
#INFO  [2025-03-20 16:52:25]: Removed old configuration in plist file: /Users/aaron.schultz/MyApplications/Mobile/React Native/ReactNativeSampleApp/ios/ReactNativeSampleApp/Info.plist
#INFO  [2025-03-20 16:52:26]: Updated configuration in plist file: /Users/aaron.schultz/MyApplications/Mobile/React Native/ReactNativeSampleApp/ios/ReactNativeSampleApp/Info.plist&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-3.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27189i77F38A11630B0258/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-3.png" alt="npxinstrumentdynatrace-3.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;If no changes were made to the dynatrace.config.js&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For Android, the gradle file will be written, but since nothing change, the output will be the same.&lt;/P&gt;&lt;P&gt;For iOS, the plugin is aware that the p.list is the same and does not make any further changes to the p.list&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="npxinstrumentdynatrace-4.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27190i2E4C7F554F1364F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="npxinstrumentdynatrace-4.png" alt="npxinstrumentdynatrace-4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;!--    notionvc: b3b9b179-9d60-42aa-a9ff-ee191e9eeb79    --&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 13:19:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/React-Native-Explaining-npx-instrumentdynatrace/m-p/273511#M1601</guid>
      <dc:creator>Aaron_Schultz</dc:creator>
      <dc:date>2025-03-28T13:19:18Z</dc:date>
    </item>
  </channel>
</rss>

