Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrization not working as expected since updating sdk #11938

Closed
3 tasks done
gid-sentry opened this issue May 7, 2024 · 2 comments
Closed
3 tasks done

Parametrization not working as expected since updating sdk #11938

gid-sentry opened this issue May 7, 2024 · 2 comments
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug

Comments

@gid-sentry
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

7.108

Framework Version

React Router v5.3.4

Link to Sentry event

No response

SDK Setup

Sentry.init({
            dsn: "...",
            release: "app@" + appVersion,
            integrations: [
                Sentry.reactRouterV5BrowserTracingIntegration({
                    history,
                    enableInp: true,
                    shouldCreateSpanForRequest: (url) => {
                        return !url.match(/(\/cookie-jar\/|\/comscore.json)/);
                    },
                }),
            ],
            environment,
            allowUrls,
            denyUrls,
            ignoreErrors,
            tracesSampleRate,
            beforeSend: beforeSend(beforeSendFilter),
        });

// Route.js
import { Route } from "react-router-dom";
import { withSentryRouting } from "@sentry/react";

export default withSentryRouting(Route);

---
// App.js
const history = createBrowserHistory();

function App() {
  // ...
	
  const renderRoutes = routes.map(({ path, component, exact }, index) => {
    const Component = component;
    return (
      <Route
        key={index}
        exact={exact}
        path={path}
        render={(renderProps) => {
          // some logic here
          return <Component {...renderProps} />;
        }}
      />
    );
  });

  // ...

  return (
    <Router history={history}>
      {/* ... */}
      <Switch>{renderRoutes}</Switch>
      {/* ... */}
    </Router>
  );
}

Steps to Reproduce

Update SDK and parametrization suddenly changed from catching /:section*/:title-:contentId(\d.\d+)
to what looks like might be the default sdk's parametrization attempt.

Expected Result

Custom parametrization logic still being applied

Actual Result

Available in internal customer case.
Looks like the default sdk parametrization is being used
https://www.notion.so/sentry/Broken-parametrization-in-updated-JS-sdk-d8150eb03fbc4a409ca931761cc2e786

@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label May 7, 2024
@mydea
Copy link
Member

mydea commented May 7, 2024

Hey,
thanks for writing in. We probably have to backport #11855, forgot about that - we'll look into it!

@mydea
Copy link
Member

mydea commented May 15, 2024

So we've released a new v7 version with this fix, as well as also having a stable v8.0.0 version out where that should be fixed. I'll close this issue, if you still encounter this on the latest version (of either v7 or v8) please feel free to reopen!

@mydea mydea closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug
Projects
Archived in project
Development

No branches or pull requests

2 participants