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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to Sentry instrumentation in React. I am using the
withProfilerHOC around some of my components to collect performance data. However, the only transactions I see with any meaningful spans arepageloadandnavigation. They contain spans likeui.react.mountandui.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 thewithProfilerHOC would provide.How do I add spans generated by
withProfilerinstances to a custom transaction? Is this something that can/should be done?Example:
Parent.tsx:TimerCard.tsx:The transaction created inside the
useEffectcontains 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 thewithProfilerattaches the spans that it creates? Does it even generate spans? How do I debug that?Beta Was this translation helpful? Give feedback.
All reactions