Instrumenting route changes #431
Unanswered
andreiborza
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello,
I'm working on the Sentry SDK for SolidJS. As part of our SDKs, we offer various tracing integrations, for example a browser integration that instruments pageloads and navigations.
For React, we offer a higher-order component for React Router that allows us to track location changes, c.f. https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/#usage-with-routes--component.
I took a similar approach for Solid Router, a higher-order component that wraps Solid Router and creates a wrapped root component in which we use
useBeforeLeave
anduseNavigation
to create navigation spans for tracing.For that, users have to pass in
useBeforeLeave
anduseNavigation
, see the README.I'm wondering if there's a better DX to be had, maybe being able to pass a router context in and adding listeners directly instead of the user having to go through a 2 step setup. I'd love some help, pointers on that.
Beta Was this translation helpful? Give feedback.
All reactions