I just connected Datadog RUM on my React SPA application, this application is not connected to a backend but uses graphql apis from another application which has Datadog tracing agent set on it
datadogRum.init({
applicationId: 'xxxxxxxxx',
clientToken: 'xxxxxxxxxxxxxx',
site: 'datadoghq.com',
service: 'order',
env: 'staging',
// Specify a version number to identify the deployed version of your application in Datadog
// version: '1.0.0',
sampleRate: 100,
premiumSampleRate: 100,
trackInteractions: true,
defaultPrivacyLevel: 'mask-user-input',
allowedTracingOrigins: [/https:\/\/(?:api|app)\.example\.(?:cc|com)\/graphql/],
})
I already have datadog tracing agent set on. app.example.com which is a monolith Ruby on rails application but also exposes a graphql api
I want to be able to get the graphql calls made from the React frontend to the ROR app on the Datadog RUM traces tab, but with my current setup nothing happens.
on the Datadog docs these are the prerequisite for this to work.
- You have set up APM tracing on the services targeted by your RUM applications.
- Your services use an HTTP server.
- Your HTTP servers are using a library that supports distributed tracing.
- You have XMLHttpRequest (XHR) or Fetch resources on the RUM Explorer to your allowedTracingOrigins.
- You have a corresponding trace for requests to allowedTracingOrigins.
I think I have all those met I am not completely sure, but my question is how do I properly connect Datadog RUM to traces.