@sentry/ember 10.32.0-alpha.0 → 10.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,13 +84,15 @@ function getTransitionInformation(
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
// Only exported for testing
|
|
88
|
+
export function _getLocationURL(location: EmberRouterMain['location']): string {
|
|
88
89
|
if (!location?.getURL || !location?.formatURL) {
|
|
89
90
|
return '';
|
|
90
91
|
}
|
|
91
92
|
const url = location.formatURL(location.getURL());
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
// `implementation` is optional in Ember's predefined location types, so we also check if the URL starts with '#'.
|
|
95
|
+
if (location.implementation === 'hash' || url.startsWith('#')) {
|
|
94
96
|
return `${location.rootURL}${url}`;
|
|
95
97
|
}
|
|
96
98
|
return url;
|
|
@@ -110,7 +112,7 @@ export function _instrumentEmberRouter(
|
|
|
110
112
|
|
|
111
113
|
// Maintaining backwards compatibility with config.browserTracingOptions, but passing it with Sentry options is preferred.
|
|
112
114
|
const browserTracingOptions = config.browserTracingOptions || config.sentry.browserTracingOptions || {};
|
|
113
|
-
const url =
|
|
115
|
+
const url = _getLocationURL(location);
|
|
114
116
|
|
|
115
117
|
const client = getClient<BrowserClient>();
|
|
116
118
|
|
package/addon/types.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type RouterService from '@ember/routing/router-service';
|
|
|
3
3
|
import type { startBrowserTracingNavigationSpan as startBrowserTracingNavigationSpanType, startBrowserTracingPageLoadSpan as startBrowserTracingPageLoadSpanType } from '@sentry/browser';
|
|
4
4
|
import type { EmberRouterMain, EmberSentryConfig } from '../types';
|
|
5
5
|
export declare function initialize(appInstance: ApplicationInstance): void;
|
|
6
|
+
export declare function _getLocationURL(location: EmberRouterMain['location']): string;
|
|
6
7
|
export declare function _instrumentEmberRouter(routerService: RouterService, routerMain: EmberRouterMain, config: EmberSentryConfig, startBrowserTracingPageLoadSpan: typeof startBrowserTracingPageLoadSpanType, startBrowserTracingNavigationSpan: typeof startBrowserTracingNavigationSpanType): void;
|
|
7
8
|
export declare function instrumentForPerformance(appInstance: ApplicationInstance): Promise<void>;
|
|
8
9
|
declare const _default: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/ember",
|
|
3
|
-
"version": "10.32.
|
|
3
|
+
"version": "10.32.1",
|
|
4
4
|
"description": "Official Sentry SDK for Ember.js",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/core": "^7.27.7",
|
|
34
34
|
"@embroider/macros": "^1.16.0",
|
|
35
|
-
"@sentry/browser": "10.32.
|
|
36
|
-
"@sentry/core": "10.32.
|
|
35
|
+
"@sentry/browser": "10.32.1",
|
|
36
|
+
"@sentry/core": "10.32.1",
|
|
37
37
|
"ember-auto-import": "^2.7.2",
|
|
38
38
|
"ember-cli-babel": "^8.2.0",
|
|
39
39
|
"ember-cli-htmlbars": "^6.1.1",
|