Skip to content

Commit

Permalink
fix(ember): Fix rootURL breaking route recognition (#3166)
Browse files Browse the repository at this point in the history
* fix(ember): Fix rootURL breaking route recognition

Mentioned in #2977, route recognition needs the url to be correctly formatted. Since there are different location types, using formatURL should get the correct URL out for use in recognition.

* Update packages/ember/addon/instance-initializers/sentry-performance.ts

Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
  • Loading branch information
k-fish and kamilogorek committed Jan 13, 2021
1 parent 674eddf commit 5cad5f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function _instrumentEmberRouter(
let activeTransaction: Transaction;
let transitionSpan: Span;

const url = location && location.getURL && location.getURL();
const url = location && location.getURL && location.formatURL && location.formatURL(location.getURL());

if (macroCondition(isTesting())) {
routerService._sentryInstrumented = true;
Expand Down

0 comments on commit 5cad5f7

Please sign in to comment.