RUM agent unable to connect - Next.js & manually inserting JavaScript tag

Hey!

Currently, we’re migrating all of our front-end applications to Next.js (a React server-side framework).

My task at hand is setting up Dynatrace, but am not having much luck. We decided to pass on using the OneAgent as regardless of what we set it up for, (Node.js in this case) it was unable to auto-instrument RUM. We’re not injecting the Dynatrace RUM agent manually via the JavaScript tag. The initial assets are downloaded successfully but am now getting a 404 when DT attempts a post request against our origin.

I’ve searched the documentation and engaged live chat, but am still unable to find much context on:
1. how to resolve this issue
2. setting up RUM agent on a server-side based framework

Any help would be greatly appreciated!

Hello @smmarrocco

I always use this troubleshooting procedure to debug manual RUM injection :

Especially theses topics :

How can I confirm that the RUM JavaScript downloaded successfully?How can I confirm that the RUM JavaScript reports data to the server?What can I do if the RUM JavaScript is not executing?Can I set the `HttpOnly` flag on Dynatrace cookies?Can I test that the monitor signal passes through my infrastructure?After setting up OneAgent for Real User Monitoring, my application is not working. What can I do?Why is there a delay in the display of new user session data?I hope it will help you.Don’t hesitate to post your results at each steps of troubleshooting.

Regards Aurélien.