sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Support Tanstack Router for performance instrumentation

Open cstavitsky opened this issue 1 year ago • 5 comments

Problem Statement

Currently Sentry supports React Router. This request is to provide an official Tanstack Router integration.

Solution Brainstorm

Create an official Tanstack Router integration that has more-or-less feature parity with the existing React Router integration.

If you would like to see support for this, please leave a comment/reaction. That helps us prioritize accordingly. Thanks!

┆Issue is synchronized with this Jira Improvement by Unito

cstavitsky avatar Apr 21 '23 00:04 cstavitsky

Tanstack Router has released v1 https://tanstack.com/router/v1

AbhiPrasad avatar Jan 05 '24 18:01 AbhiPrasad

Are there any plans for this ? Or did someone find a way to make it work ?

maxstue avatar Feb 09 '24 08:02 maxstue

No current plans given we are busy working on the new major version of JS SDK, v8.

If you would like to add your own instrumentation, take a look at the react router integration. You should be able to do something very similar. https://github.com/getsentry/sentry-javascript/blob/d024a7695a47cdc17ef63a4b9cf190a3df56899b/packages/react/src/reactrouterv6.tsx#L73

AbhiPrasad avatar Feb 09 '24 18:02 AbhiPrasad

Is there any guidance in building my own instrumentation? I spent a little bit of time reading through the source code but didn't fully understand what everything is for.

enaluz avatar May 21 '24 23:05 enaluz

Here's a PR - https://github.com/getsentry/sentry-javascript/pull/12095 - we'll try to get this merged in as soon as we can!

AbhiPrasad avatar May 21 '24 23:05 AbhiPrasad

The TanStack Router integration was just released in version 8.7.0! Here are the docs: https://docs.sentry.io/platforms/javascript/guides/react/features/tanstack-router/

lforst avatar May 29 '24 19:05 lforst