Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enrich Distributed Tracing Context? #17589

Unanswered
matthieuauger asked this question in Q&A
Discussion options

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

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /