Showing results for 
Show  only  | Search instead for 
Did you mean: 

Next.js and opentelemetry


We have a Next.js app running in GCP Cloud Run, we can to use open telemetry with the app to export OTel data to Oneagent or Activegate. It looks like this is possible but there seems to gaps in the documentation. 


"Next.js supports OpenTelemetry instrumentation out of the box" which means we don't need to do anything expect enable this with the next.js app (I noted that is it experimental on their site)

So once the app is setup to we can then use either the SaaS or Local Env ActiveGate paths [LINK] to export using OTLP. 


Flow should this.  Next.js -> ActiveGate -> Dynatrace SaaS

From what I have read this will give us the traces and spans from the next.js app so that dynatrace can correlate these with the traces from other backend systems. Is there anything that I am missing in this setup or are there any limitations that anyone can point out? 



Dynatrace Champion
Dynatrace Champion

Here you have further information regarding the export to an AG endpoint

And for your use case this example should adhere the most

What you need to take care of is the context extraction and propagation to have the correlation between services.

Thanks for the information, are you saying that to monitor Next.js we can use the Node.js docuentation?

Dynatrace Champion
Dynatrace Champion

It is the next best thing I would suggest that already exists as official documentation.

But feel free to go through some of the other samples if you feel more comfortable in another language


Featured Posts