Can't see any ui.react.update spans anywhere, custom transactions are not useful at all since no spans are added to them. #7660
Unanswered
ashwingairola
asked this question in
Q&A
Replies: 1 comment 9 replies
-
@ashwingairola you'll have to set the const transaction = startTransaction({ name: "timerCard:render" });
Sentry.getCurrentHub().getScope().setSpan(transaction); |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am new to Sentry instrumentation in React. I am using the
withProfiler
HOC around some of my components to collect performance data. However, the only transactions I see with any meaningful spans arepageload
andnavigation
. They contain spans likeui.react.mount
andui.react.render
, but neverui.react.update
.When I try creating custom transactions in my React code, the transactions are reported, but they don't contain any meaningful spans other than those that I create using
startChild
. I have never been able to see any spans related to component re-renders, which I assumed that thewithProfiler
HOC would provide.How do I add spans generated by
withProfiler
instances to a custom transaction? Is this something that can/should be done?Example:
Parent.tsx
:TimerCard.tsx
:The transaction created inside the
useEffect
contains span other than the one that I am creating (customOp
). I know that spans need to be attached to transactions, so which transaction is it to which thewithProfiler
attaches the spans that it creates? Does it even generate spans? How do I debug that?Beta Was this translation helpful? Give feedback.
All reactions