Skip to content

Commit e2a465d

Browse files
committed
feat(ember): Migrate @sentry/ember to v2 addon format
1 parent d39907b commit e2a465d

File tree

127 files changed

+9167
-8921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+9167
-8921
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ env:
4545
${{ github.workspace }}/dev-packages/*/build
4646
${{ github.workspace }}/packages/*/build
4747
${{ github.workspace }}/packages/*/lib
48-
${{ github.workspace }}/packages/ember/*.d.ts
48+
${{ github.workspace }}/packages/ember/dist
49+
${{ github.workspace }}/packages/ember/declarations
4950
${{ github.workspace }}/packages/gatsby/*.d.ts
5051
5152
BUILD_CACHE_TARBALL_KEY: tarball-${{ github.event.inputs.commit || github.sha }}

dev-packages/e2e-tests/test-applications/ember-classic/app/app.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import Resolver from 'ember-resolver';
66
import config from './config/environment';
77

88
Sentry.init({
9+
dsn: config.sentryDsn,
10+
tracesSampleRate: 1,
911
replaysSessionSampleRate: 1,
1012
replaysOnErrorSampleRate: 1,
13+
tracePropagationTargets: ['localhost', 'doesntexist.example'],
1114
tunnel: `http://localhost:3031/`, // proxy server
1215
});
1316

dev-packages/e2e-tests/test-applications/ember-classic/app/config/environment.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare const config: {
1111
podModulePrefix: string;
1212
locationType: 'history' | 'hash' | 'none' | 'auto';
1313
rootURL: string;
14+
sentryDsn: string;
1415
APP: Record<string, unknown>;
1516
};
1617

dev-packages/e2e-tests/test-applications/ember-classic/app/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<meta name="description" content="">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88

9+
<script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-start');}</script>
10+
911
{{content-for "head"}}
1012

1113
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
@@ -19,6 +21,8 @@
1921
<script src="{{rootURL}}assets/vendor.js"></script>
2022
<script src="{{rootURL}}assets/ember-classic.js"></script>
2123

24+
<script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-end');}</script>
25+
2226
{{content-for "body-footer"}}
2327
</body>
2428
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type ApplicationInstance from '@ember/application/instance';
2+
import { setupPerformance } from '@sentry/ember/performance';
3+
4+
export function initialize(appInstance: ApplicationInstance): void {
5+
setupPerformance(appInstance, {
6+
minimumRunloopQueueDuration: 0,
7+
minimumComponentRenderDuration: 0,
8+
});
9+
}
10+
11+
export default {
12+
initialize,
13+
};

dev-packages/e2e-tests/test-applications/ember-classic/config/environment.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,7 @@ module.exports = function (environment) {
1919
},
2020
};
2121

22-
ENV['@sentry/ember'] = {
23-
sentry: {
24-
tracesSampleRate: 1,
25-
dsn: process.env.E2E_TEST_DSN,
26-
tracePropagationTargets: ['localhost', 'doesntexist.example'],
27-
browserTracingOptions: {
28-
_experiments: {
29-
// This lead to some flaky tests, as that is sometimes logged
30-
enableLongTask: false,
31-
},
32-
},
33-
},
34-
ignoreEmberOnErrorWarning: true,
35-
minimumRunloopQueueDuration: 0,
36-
minimumComponentRenderDuration: 0,
37-
};
22+
ENV.sentryDsn = process.env.E2E_TEST_DSN;
3823

3924
if (environment === 'development') {
4025
// ENV.APP.LOG_RESOLVER = true;

dev-packages/e2e-tests/test-applications/ember-embroider/app/app.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ import loadInitializers from 'ember-load-initializers';
55
import Resolver from 'ember-resolver';
66

77
Sentry.init({
8+
dsn: config.sentryDsn,
9+
tracesSampleRate: 1,
810
replaysSessionSampleRate: 1,
911
replaysOnErrorSampleRate: 1,
12+
tracePropagationTargets: ['localhost', 'doesntexist.example'],
1013
tunnel: `http://localhost:3031/`, // proxy server
1114
});
1215
export default class App extends Application {

dev-packages/e2e-tests/test-applications/ember-embroider/app/config/environment.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare const config: {
1111
podModulePrefix: string;
1212
locationType: 'history' | 'hash' | 'none' | 'auto';
1313
rootURL: string;
14+
sentryDsn: string;
1415
APP: Record<string, unknown>;
1516
};
1617

dev-packages/e2e-tests/test-applications/ember-embroider/app/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<meta name="description" content="">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88

9+
<script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-start');}</script>
10+
911
{{content-for "head"}}
1012

1113
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
@@ -19,6 +21,8 @@
1921
<script src="{{rootURL}}assets/vendor.js"></script>
2022
<script src="{{rootURL}}assets/ember-embroider.js"></script>
2123

24+
<script>if(window.performance&&window.performance.mark){window.performance.mark('@sentry/ember:initial-load-end');}</script>
25+
2226
{{content-for "body-footer"}}
2327
</body>
2428
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type ApplicationInstance from '@ember/application/instance';
2+
import { setupPerformance } from '@sentry/ember/performance';
3+
4+
export function initialize(appInstance: ApplicationInstance): void {
5+
setupPerformance(appInstance, {
6+
minimumRunloopQueueDuration: 0,
7+
minimumComponentRenderDuration: 0,
8+
});
9+
}
10+
11+
export default {
12+
initialize,
13+
};

0 commit comments

Comments
 (0)