Real User Monitoring
User session monitoring, key user actions - everything RUM.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

npx instrumentDynatrace

chrism-hbf
Newcomer
We have an app built with expo.

Instead of the default app.json, we're using app.config.ts.

When running the instrumentDynatrace command, Android instrumentation succeeds, but iOS fails with the error below:

#INFO [2026-02-10 13:31:34]: Starting instrumentation of React Native application ..
#INFO [2026-02-10 13:31:34]: ℹ️ Dynatrace React Native Plugin - Version 2.327.2
#INFO [2026-02-10 13:31:34]: Trying to read configuration file: expo-app/dynatrace.config.js
#INFO [2026-02-10 13:31:34]: Starting Android Instrumentation with Dynatrace!
#INFO [2026-02-10 13:31:34]: ℹ️ Dynatrace plugin & agent already added to build.gradle
#INFO [2026-02-10 13:31:34]: ℹ️ Replaced old configuration with current configuration in dynatrace.gradle
#INFO [2026-02-10 13:31:34]: ℹ️ Runtime script already present in expo-app/android/app/build.gradle
#INFO [2026-02-10 13:31:34]: Finished Android Instrumentation with Dynatrace!
#INFO [2026-02-10 13:31:34]: Starting iOS Instrumentation with Dynatrace!
#ERROR [2026-02-10 13:31:34]: iOS Instrumentation failed: ENOENT: no such file or directory, open 'expo-app/app.json'
#INFO [2026-02-10 13:31:34]: Patching SourceMap generation of Metro ..
#INFO [2026-02-10 13:31:34]: ℹ️ Patching of SourceMap already happened!
#INFO [2026-02-10 13:31:34]: 🎉 Finished instrumentation of React Native application ..

From what I can see, the script supports Gradle, plist, and Dynatrace config inputs, but there's no option to specify a custom Expo app config path. It appears to assume app.json always exists.

As a workaround, I've written a custom Expo plugin to manually instrument the iOS side.

Is support for app.config.ts planned, or is there a supported way to point the instrumentation script at a non-default Expo config that I've missed?

Any help would be appreciated.

Thanks,
Chris
4 REPLIES 4

matthias_hochri
Dynatrace Pro
Dynatrace Pro

Thanks for reporting this. I saw this already once in the past, which will increase prioritization for us. For now you can work around this by using custom arguments regarding plist file: https://www.npmjs.com/package/@dynatrace/react-native-plugin#customizing-paths-for-configuration

 

Hi Matthias,

Thanks for coming back to me, but I am not sure how setting the plist would resolve this issue? The command doesn't have a problem with that but the app.json, which I can see is a hardcoded value in the sourcecode, and cannot be overridden by args.

 

Thanks,

Chris

Please try and tell us if the error is gone. app.json file is used during plist finding. If you provide your own path we skip utilizing it. As said in the other response, we will try to find an alternative way to get rid in general of this issue for you.

Thanks @matthias_hochri , that was the fix. I should have tried that before coming back.

Appreciate your help on this.

Featured Posts