You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently came across this issue in my code where we were initializing the Apollo Client before initializing the DataDog RUM package. I was able to fix this by moving the DataDog initialization higher up in the tree (in the same file as where the render(...) function is used), but I thought I would call it out here. I'll add some pseudo-code samples since this is hard to reproduce without a public DataDog account.
With this implementation, you should see that none of the x-datadog-* headers are present in the request header of any of the GraphQL requests, and I believe it is very tied to what was highlighted in #7130.
Let me know if you need any additional details, yes?
Cheers!
The text was updated successfully, but these errors were encountered:
@phryneas, just tested it, and you are absolutely right! That did the trick 🎉
It seems like we were implementing this most likely because we used to have SSR and used to use node-fetch at some point (this was implemented before our time). Since we moved to Vite recently, we don't need this implementation anymore, and this was just an oversight on our part.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Original Issue
Originally posted by @phryneas in #7130 (comment)
Hello! 👋🏻
I recently came across this issue in my code where we were initializing the Apollo Client before initializing the DataDog RUM package. I was able to fix this by moving the DataDog initialization higher up in the tree (in the same file as where the
render(...)
function is used), but I thought I would call it out here. I'll add some pseudo-code samples since this is hard to reproduce without a public DataDog account.Package versions:
Code Sample
ApolloClientProvider.jsx
DataDogRumProvider.jsx
Application.jsx
With this implementation, you should see that none of the
x-datadog-*
headers are present in the request header of any of the GraphQL requests, and I believe it is very tied to what was highlighted in #7130.Let me know if you need any additional details, yes?
Cheers!
The text was updated successfully, but these errors were encountered: