@sentry/nextjs
Advanced tools
Comparing version
@@ -162,2 +162,4 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
rootSpan.setAttribute(semanticConventions.ATTR_HTTP_ROUTE, route); | ||
// Preserving the original attribute despite internally not depending on it | ||
rootSpan.setAttribute('next.route', route); | ||
} | ||
@@ -309,7 +311,10 @@ } | ||
const target = event.contexts?.trace?.data?.[semanticConventions.SEMATTRS_HTTP_TARGET]; | ||
const route = event.contexts.trace.data[semanticConventions.ATTR_HTTP_ROUTE]; | ||
const route = event.contexts.trace.data[semanticConventions.ATTR_HTTP_ROUTE] || event.contexts.trace.data['next.route']; | ||
if (typeof method === 'string' && typeof route === 'string') { | ||
event.transaction = `${method} ${route.replace(/\/route$/, '')}`; | ||
const cleanRoute = route.replace(/\/route$/, ''); | ||
event.transaction = `${method} ${cleanRoute}`; | ||
event.contexts.trace.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route'; | ||
// Preserve next.route in case it did not get hoisted | ||
event.contexts.trace.data['next.route'] = cleanRoute; | ||
} | ||
@@ -316,0 +321,0 @@ |
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"9.19.0","sideEffects":false} | ||
{"type":"module","version":"9.20.0","sideEffects":false} |
@@ -161,2 +161,4 @@ import { context } from '@opentelemetry/api'; | ||
rootSpan.setAttribute(ATTR_HTTP_ROUTE, route); | ||
// Preserving the original attribute despite internally not depending on it | ||
rootSpan.setAttribute('next.route', route); | ||
} | ||
@@ -308,7 +310,10 @@ } | ||
const target = event.contexts?.trace?.data?.[SEMATTRS_HTTP_TARGET]; | ||
const route = event.contexts.trace.data[ATTR_HTTP_ROUTE]; | ||
const route = event.contexts.trace.data[ATTR_HTTP_ROUTE] || event.contexts.trace.data['next.route']; | ||
if (typeof method === 'string' && typeof route === 'string') { | ||
event.transaction = `${method} ${route.replace(/\/route$/, '')}`; | ||
const cleanRoute = route.replace(/\/route$/, ''); | ||
event.transaction = `${method} ${cleanRoute}`; | ||
event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route'; | ||
// Preserve next.route in case it did not get hoisted | ||
event.contexts.trace.data['next.route'] = cleanRoute; | ||
} | ||
@@ -315,0 +320,0 @@ |
{ | ||
"name": "@sentry/nextjs", | ||
"version": "9.19.0", | ||
"version": "9.20.0", | ||
"description": "Official Sentry SDK for Next.js", | ||
@@ -82,8 +82,8 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"@rollup/plugin-commonjs": "28.0.1", | ||
"@sentry-internal/browser-utils": "9.19.0", | ||
"@sentry/core": "9.19.0", | ||
"@sentry/node": "9.19.0", | ||
"@sentry/opentelemetry": "9.19.0", | ||
"@sentry/react": "9.19.0", | ||
"@sentry/vercel-edge": "9.19.0", | ||
"@sentry-internal/browser-utils": "9.20.0", | ||
"@sentry/core": "9.20.0", | ||
"@sentry/node": "9.20.0", | ||
"@sentry/opentelemetry": "9.20.0", | ||
"@sentry/react": "9.20.0", | ||
"@sentry/vercel-edge": "9.20.0", | ||
"@sentry/webpack-plugin": "3.3.1", | ||
@@ -90,0 +90,0 @@ "chalk": "3.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1289129
0.14%12050
0.08%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated