stackflow icon indicating copy to clipboard operation
stackflow copied to clipboard

Sentry tracing integration

Open XiNiHa opened this issue 1 year ago • 6 comments

There are various Sentry integrations for SPA routers with tracing support, a TanStack Router integration for example. Having one for Stackflow would be very helpful for Sentry users. Since we already have event-driven plugin architecture, I guess it'd be pretty straightforward to make a plugin for it.

XiNiHa avatar Sep 24 '24 03:09 XiNiHa

Thanks for the great suggestion Xiniha!

I've had a quick look at it, but I'm not sure what the benefits of integrating router framework with Sentry would be. It looks like it adds navigation tracing, but would that be a big help in tracking errors?

https://github.com/getsentry/sentry-javascript/blob/de9cf8a30b61c652264610a31d0c8322748cb46d/packages/react/src/tanstackrouter.ts#L78-L85

tonyfromundefined avatar Sep 24 '24 06:09 tonyfromundefined

I believe it can be helpful for both performance monitoring and debugging.

  • Tracking routing and dataloading performances would be important to understand overall performance characteristics of application.
  • While debugging, it's quite useful to know which route a user was on. However, the builtin tracing feature of Sentry relies on History API tracking and therefore doesn't work well with Stackflow - especially when history sync extension is not / can't be used.

XiNiHa avatar Sep 28 '24 06:09 XiNiHa

Okay, that makes sense now that I understand the situation “history sync extension can't be used”. I think it's a good suggestion, and since we don't have the resources right now, I'd be happy if you could contribute to it yourself

tonyfromundefined avatar Oct 02 '24 04:10 tonyfromundefined

I'll look into it when I get some spare time 😅 If anyone is interested in the feature, let me know so I can bump up the priority!

XiNiHa avatar Oct 02 '24 06:10 XiNiHa

@XiNiHa @tonyfromundefined

Hello! im interested in this issue

I already made minimal version of sentry plugin for stackflow and tested it with local server & sentry. seems working properly!

  • error logging
  • url navigation logging
  • pageload transaction logging

If no one else is currently working on this issue can i try this feature?

ysh4296 avatar Nov 12 '24 03:11 ysh4296

Sounds great 👍

XiNiHa avatar Nov 12 '24 03:11 XiNiHa