-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
10.2.0
Framework Version
Next 14.2.23
Link to Sentry event
No response
Reproduction Example/SDK Setup
next.config.js
const nextConfig = {
// other options
basePath: '/shop'
}
instrumentation-client.ts
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: SENTRY_DSN
integrations: [],
// other options
})
sentry app dir path
- use next-intl
- use basePath
/shop
./[locale]
./[locale]/[...others]
./[locale]/product/[id]
Steps to Reproduce
- request
/shop/ko/product/23kjkfdf
url page - sentry send pageload transaction with
:locale/:others*
Expected Result
sentry send pageload transaction with shop/:locale/product/:id
or :locale/product/:id
Actual Result
sentry send pageload transaction with :locale/:others*
Additional Context
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1
or me too
, to help us triage it.
I use next.js app with basePath config option activated with `/shop``
However, when using Sentry, transactions are always parameterized as :locale/:others*
.
Because of this, I cannot group transactions correctly (e.g. /shop/ko/product/s192389
should map to :locale/product/:id
, or shop/:locale/product/:id
but it ends up as /:locale/:others*
).
It seems that createRouteManifest
generates regexes without considering basePath
.
Metadata
Metadata
Assignees
Projects
Status