@sentry/react
Advanced tools
Comparing version 5.25.0-beta.2 to 5.25.0
@@ -20,9 +20,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
if (startTransactionOnPageLoad && global && global.location) { | ||
prevName = normalizeTransactionName(routes, global.location, match); | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'pageload', | ||
tags: { | ||
'routing.instrumentation': 'react-router-v3', | ||
}, | ||
normalizeTransactionName(routes, global.location, match, function (localName) { | ||
prevName = localName; | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'pageload', | ||
tags: { | ||
'routing.instrumentation': 'react-router-v3', | ||
}, | ||
}); | ||
}); | ||
@@ -36,11 +38,13 @@ } | ||
} | ||
var tags = { 'routing.instrumentation': 'react-router-v3' }; | ||
var tags_1 = { 'routing.instrumentation': 'react-router-v3' }; | ||
if (prevName) { | ||
tags.from = prevName; | ||
tags_1.from = prevName; | ||
} | ||
prevName = normalizeTransactionName(routes, location, match); | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'navigation', | ||
tags: tags, | ||
normalizeTransactionName(routes, location, match, function (localName) { | ||
prevName = localName; | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'navigation', | ||
tags: tags_1, | ||
}); | ||
}); | ||
@@ -56,3 +60,3 @@ } | ||
*/ | ||
function normalizeTransactionName(appRoutes, location, match) { | ||
function normalizeTransactionName(appRoutes, location, match, callback) { | ||
var name = location.pathname; | ||
@@ -64,12 +68,11 @@ match({ | ||
if (error || !renderProps) { | ||
return name; | ||
return callback(name); | ||
} | ||
var routePath = getRouteStringFromRoutes(renderProps.routes || []); | ||
if (routePath.length === 0 || routePath === '/*') { | ||
return name; | ||
return callback(name); | ||
} | ||
name = routePath; | ||
return name; | ||
return callback(name); | ||
}); | ||
return name; | ||
} | ||
@@ -76,0 +79,0 @@ /** |
@@ -19,9 +19,11 @@ import { getGlobalObject } from '@sentry/utils'; | ||
if (startTransactionOnPageLoad && global && global.location) { | ||
prevName = normalizeTransactionName(routes, global.location, match); | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'pageload', | ||
tags: { | ||
'routing.instrumentation': 'react-router-v3', | ||
}, | ||
normalizeTransactionName(routes, global.location, match, function (localName) { | ||
prevName = localName; | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'pageload', | ||
tags: { | ||
'routing.instrumentation': 'react-router-v3', | ||
}, | ||
}); | ||
}); | ||
@@ -35,11 +37,13 @@ } | ||
} | ||
var tags = { 'routing.instrumentation': 'react-router-v3' }; | ||
var tags_1 = { 'routing.instrumentation': 'react-router-v3' }; | ||
if (prevName) { | ||
tags.from = prevName; | ||
tags_1.from = prevName; | ||
} | ||
prevName = normalizeTransactionName(routes, location, match); | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'navigation', | ||
tags: tags, | ||
normalizeTransactionName(routes, location, match, function (localName) { | ||
prevName = localName; | ||
activeTransaction = startTransaction({ | ||
name: prevName, | ||
op: 'navigation', | ||
tags: tags_1, | ||
}); | ||
}); | ||
@@ -54,3 +58,3 @@ } | ||
*/ | ||
function normalizeTransactionName(appRoutes, location, match) { | ||
function normalizeTransactionName(appRoutes, location, match, callback) { | ||
var name = location.pathname; | ||
@@ -62,12 +66,11 @@ match({ | ||
if (error || !renderProps) { | ||
return name; | ||
return callback(name); | ||
} | ||
var routePath = getRouteStringFromRoutes(renderProps.routes || []); | ||
if (routePath.length === 0 || routePath === '/*') { | ||
return name; | ||
return callback(name); | ||
} | ||
name = routePath; | ||
return name; | ||
return callback(name); | ||
}); | ||
return name; | ||
} | ||
@@ -74,0 +77,0 @@ /** |
{ | ||
"name": "@sentry/react", | ||
"version": "5.25.0-beta.2", | ||
"version": "5.25.0", | ||
"description": "Offical Sentry SDK for React.js", | ||
@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/browser": "5.25.0-beta.2", | ||
"@sentry/minimal": "5.25.0-beta.2", | ||
"@sentry/types": "5.25.0-beta.2", | ||
"@sentry/utils": "5.25.0-beta.2", | ||
"@sentry/browser": "5.25.0", | ||
"@sentry/minimal": "5.25.0", | ||
"@sentry/types": "5.25.0", | ||
"@sentry/utils": "5.25.0", | ||
"hoist-non-react-statics": "^3.3.2", | ||
@@ -32,3 +32,3 @@ "tslib": "^1.9.3" | ||
"devDependencies": { | ||
"@sentry-internal/eslint-config-sdk": "5.24.2", | ||
"@sentry-internal/eslint-config-sdk": "5.25.0", | ||
"@testing-library/react": "^10.4.9", | ||
@@ -81,2 +81,5 @@ "@testing-library/react-hooks": "^3.3.0", | ||
}, | ||
"volta": { | ||
"extends": "../../package.json" | ||
}, | ||
"jest": { | ||
@@ -83,0 +86,0 @@ "collectCoverage": true, |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
183013
1643
0
+ Added@sentry/browser@5.25.0(transitive)
+ Added@sentry/core@5.25.0(transitive)
+ Added@sentry/hub@5.25.0(transitive)
+ Added@sentry/minimal@5.25.0(transitive)
+ Added@sentry/types@5.25.0(transitive)
+ Added@sentry/utils@5.25.0(transitive)
- Removed@sentry/browser@5.25.0-beta.2(transitive)
- Removed@sentry/core@5.25.0-beta.2(transitive)
- Removed@sentry/hub@5.25.0-beta.2(transitive)
- Removed@sentry/minimal@5.25.0-beta.2(transitive)
- Removed@sentry/types@5.25.0-beta.2(transitive)
- Removed@sentry/utils@5.25.0-beta.2(transitive)
Updated@sentry/browser@5.25.0
Updated@sentry/minimal@5.25.0
Updated@sentry/types@5.25.0
Updated@sentry/utils@5.25.0