Skip to content

Parametrization not working as expected since updating sdk  #11938

@gid-sentry

Description

@gid-sentry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: browserIssues related to the Sentry Browser SDK

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions