Replies: 1 comment 7 replies
-
Hi @jansedlon, first of all, thank you a ton for writing in and for detailing your process! It's always easier to say nothing and move on instead of sharing such feedback so I just wanted to let you know we appreciate this a lot! I already asked @onurtemizkan who has been working a lot on the Remix SDK to share thoughts around your experience as well so that we can find a good solution and ideally some clear points that we can improve on our end. Let me address some things already upfront: As far as I understand these are your main pain points:
Please let me know if there's something else I missed. I already raised your feedback internally, too. We'll soon derive some concrete action points from this. Again, thank you for your feedback! PS:
Fortunately, I'm "just" an engineer in the JS SDK team - more coding; less meetings 😅 |
Beta Was this translation helpful? Give feedback.
-
Hi @Lms24 ! I noticed that you're probably the project manager. You have answered to few of my issues before. I'm sorry if mentioning you here is not relevant.
Let me just say that I love Sentry and I don't mean to offend anyone, I just want to share my experience of using Sentry.
I have a React Remix project and I had setup distributed tracing a few months ago. I though it was working but today I found out that it does not. I'm trying to make sense of the documentation and there's so many information either missing or incorrect.
It's really hard to summarize it because it's been a pain for the last few days. So I'm just gonna share the parts where I had an issue.
I'm probably gonna update this post from time to time when I find something else.
Before I start, let me share my configuration
entry.client.tsx
entry.server.tsx
In my Express server I use the
wrapExpressCreateRequestHandler
andSetting up meta tags for
sentry-trace
andbaggage
I had this snippet in my code for some time but I didn't know where the values are coming from.
So I went through the documentation again and found this part
Ookay, so the important part is
Nice, so in my root loader should be
span.toSentryTrace()
. How do I get the span? I triedIs this correct? I have no idea. I thought that the Sentry middlewares for tracing for Express server should inject headers and I should have access to them in my root loader, but I dont. Then the second parameter of
continueTrace
.startTransaction
is deprecated and alternatives arestartInactiveSpan
,startSpanManual
andstartSpan
. OnlystartInactiveSpan
doesn't require second argument which is a function. Again, is this correct? I have no idea 😅. Also,continueTrace
could return undefined. What should i do in this case? Should I create a trace manually or a span? And how?Right, so now I have a span which I don't is correct and then I have to return the necessary data from the loader so I can access it in meta function.
There is no function called
toSentryTrace
attached toSpan
in the Remix SDK. After some investigating I found there is a function calledspanToTraceHeader
coming from@sentry/core
. I had to install this dependency even thought it would probably make sense to export it from the relevant SDKs.Uhm, I don't think there is a function called
serializeBaggage
anywhere. I tried looking at@sentry/core
,@sentry/utils
, etc. I found this code in utils which has some helpers but I'm not sure which one to use. AndgetBaggage
also doesn't exist forSpan
.For now, this is where i ended up. Please note that I'm really not trying to be one of those "Karen"s and I understand that distributed tracing is hard to implement but it would be great if there was a video / article / documentation section how to implement this step by step. Making sense of errors from frontend to object is really the important part when it comes to SSR frameworks like Remix
Beta Was this translation helpful? Give feedback.
All reactions