Skip to content

Parametrization not working as expected since updating sdk  #11938

Closed

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

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 7, 2024
  2. mydea commented on May 7, 2024

    @mydea
    Member

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

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 7, 2024
  4. mydea commented on May 15, 2024

    @mydea
    Member

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions