-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Enrich Distributed Tracing Context? #17589
-
Hello, this question may be an easy one but after a lot of research and back and forth I was not able to make it work.
I currently have a project with
- React-Router Framework (frontend, SSR)
- Express for my API
I setup the Tracing for both three layers and I have a nice tracing from my React pages to my Express api calls.
Now I would like to filter an Express api span with an attribute from React-Router.
To be more specific I would like to filter my Express API span traces on the User URL, which is an information I only have in my React-Router.
So if the user is on the /login page in React, find a way to set this context somewhere to be passed automatically on my express span traces with distributed tracing.
I tried to use the setTag, setExtra, setContext from Sentry SDK, but none of these attributes are passed to my Express API.
There may be a solution for me to manually add a custom HTTP header on every call to Express, but since we already automatically pass the trace-id and baggage with distributed tracing, is there a way to enrich this context to send it automatically to my API?
Thanks for you help
Beta Was this translation helpful? Give feedback.