Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 46 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CI: Build & Test'
name: "CI: Build & Test"
on:
push:
branches:
Expand All @@ -17,7 +17,7 @@ on:
required: false
schedule:
# Run every day at midnight (without cache)
- cron: '0 0 * * *'
- cron: "0 0 * * *"

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
Expand Down Expand Up @@ -57,7 +57,7 @@ env:
# https://bsky.app/profile/joyeecheung.bsky.social/post/3lhy6o54fo22h
# Apparently some of our CI failures are attributable to a corrupt v8 cache, causing v8 failures with: "Check failed: current == end_slot_index.".
# This option both controls the `v8-compile-cache-lib` and `v8-compile-cache` packages.
DISABLE_V8_COMPILE_CACHE: '1'
DISABLE_V8_COMPILE_CACHE: "1"

jobs:
job_get_metadata:
Expand Down Expand Up @@ -85,15 +85,15 @@ jobs:
with:
ref: ${{ github.event.pull_request.base.sha }}

- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
- name: "Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})"
uses: actions/checkout@v6
with:
ref: ${{ env.HEAD_COMMIT }}

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -351,7 +351,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Check that yarn.lock is stable
run: yarn install --frozen-lockfile --ignore-engines
- name: Check for duplicate dependencies in lockfile
Expand All @@ -371,7 +371,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand All @@ -393,7 +393,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -403,7 +403,14 @@ jobs:

job_artifacts:
name: Upload Artifacts
needs: [job_get_metadata, job_build, job_build_layer, job_build_bundles, job_build_tarballs]
needs:
[
job_get_metadata,
job_build,
job_build_layer,
job_build_bundles,
job_build_tarballs,
]
runs-on: ubuntu-24.04
# Build artifacts are only needed for releasing workflow.
if: needs.job_get_metadata.outputs.is_release == 'true'
Expand All @@ -415,7 +422,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -471,7 +478,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -506,7 +513,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Restore caches
Expand All @@ -531,7 +538,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Set up Deno
uses: denoland/setup-deno@v2.0.4
with:
Expand Down Expand Up @@ -625,9 +632,9 @@ jobs:
# Only check all projects for full bundle
# We also shard the tests as they take the longest
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'webkit'
project: "webkit"
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'firefox'
project: "firefox"
- bundle: esm
project: chromium
shard: 1
Expand All @@ -647,7 +654,7 @@ jobs:
exclude:
# Do not run the un-sharded esm tests
- bundle: esm
project: 'chromium'
project: "chromium"

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand All @@ -657,7 +664,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -731,7 +738,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -787,7 +794,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -816,7 +823,7 @@ jobs:
include:
# Only check typescript for latest version (to streamline CI)
- node: 24
typescript: '3.8'
typescript: "3.8"
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v6
Expand Down Expand Up @@ -857,7 +864,7 @@ jobs:
include:
# Only check typescript for latest version (to streamline CI)
- node: 24
typescript: '3.8'
typescript: "3.8"
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v6
Expand Down Expand Up @@ -894,7 +901,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -918,7 +925,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Restore caches
Expand Down Expand Up @@ -984,7 +991,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
node-version-file: "package.json"
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -1015,20 +1022,19 @@ jobs:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We need to add the `always()` check here because the previous step has this as well :(
# See: https://github.com/actions/runner/issues/2205
if:
always() && needs.job_build_tarballs.result == 'success' && needs.job_build.outputs.e2e-matrix !='{"include":[]}'
if: always() && needs.job_build_tarballs.result == 'success' && needs.job_build.outputs.e2e-matrix !='{"include":[]}'
needs: [job_get_metadata, job_build, job_build_layer, job_build_tarballs]
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
# We just use a dummy DSN here, only send to the tunnel anyhow
E2E_TEST_DSN: 'https://username@domain/123'
E2E_TEST_DSN: "https://username@domain/123"
# Needed because some apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
NEXT_PUBLIC_E2E_TEST_DSN: "https://username@domain/123"
PUBLIC_E2E_TEST_DSN: "https://username@domain/123"
REACT_APP_E2E_TEST_DSN: "https://username@domain/123"
E2E_TEST_SENTRY_ORG_SLUG: "sentry-javascript-sdks"
E2E_TEST_SENTRY_PROJECT: "sentry-javascript-e2e-tests"
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix) }}
Expand All @@ -1043,7 +1049,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
node-version-file: "dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json"
- name: Set up Bun
if:
contains(fromJSON('["node-exports-test-app","nextjs-16-bun", "elysia-bun", "hono-4"]'),
Expand Down Expand Up @@ -1160,8 +1166,8 @@ jobs:
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
E2E_TEST_SENTRY_ORG_SLUG: "sentry-javascript-sdks"
E2E_TEST_SENTRY_PROJECT: "sentry-javascript-e2e-tests"
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix-optional) }}
Expand All @@ -1177,7 +1183,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: 'dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
node-version-file: "dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json"
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import Resolver from 'ember-resolver';
import config from './config/environment';

Sentry.init({
dsn: config.sentryDsn,
tracesSampleRate: 1,
replaysSessionSampleRate: 1,
replaysOnErrorSampleRate: 1,
tracePropagationTargets: ['localhost', 'doesntexist.example'],
Comment thread
cursor[bot] marked this conversation as resolved.
tunnel: `http://localhost:3031/`, // proxy server
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ declare const config: {
podModulePrefix: string;
locationType: 'history' | 'hash' | 'none' | 'auto';
rootURL: string;
sentryDsn: string;
APP: Record<string, unknown>;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type ApplicationInstance from '@ember/application/instance';
import { addIntegration, browserTracingIntegration } from '@sentry/ember';

export function initialize(appInstance: ApplicationInstance): void {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I am taking another look over this as we are getting closer to planning the next major, where this could go in.

Ideally, we'd align this more closely with how we handle sentry init in other places as well - which would be, to keep things centralized in Sentry.init(). Is there a way we can make this work reliably? I am thinking of something like this:

// app.ts
export default class App extends Application {
  modulePrefix = config.modulePrefix;
  podModulePrefix = config.podModulePrefix;
  Resolver = Resolver;
}

Sentry.init({
  // ...
  integrations: [
    Sentry.browserTracingIntegration({ emberApp: App })
  ]
});

and somehow derive/wrap the necessary thing inside of this? That would be the ideal solution IMHO, or something along these lines. then we can also get rid of all the async import and special options for performance etc. and just pass this directly to the (ember-specific) browser tracing integration 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or alternatively, if this cannot be made to work nicely, we could also do this in the initializer, which would be more "sentry native":

import * as Sentry from '@sentry/ember';

export function initialize(appInstance) {
  Sentry.addIntegration(Sentry.browserTracingIntegration({ 
    appInstance,
    // other options here
  }); 
}

this would possibly loose tiny bits of timing info but should overall be likely OK...

Then, we need to export a custom browserTracingIntegration from the ember package here, similar to e.g. the vue browserTracingIntegration, where we can run the actual logic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into PRing into this PR some changes for this!

addIntegration(browserTracingIntegration({
appInstance,
minimumRunloopQueueDuration: 0,
minimumComponentRenderDuration: 0,
}));
}
Comment thread
aklkv marked this conversation as resolved.

export default {
initialize,
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,7 @@ module.exports = function (environment) {
},
};

ENV['@sentry/ember'] = {
sentry: {
tracesSampleRate: 1,
dsn: process.env.E2E_TEST_DSN,
tracePropagationTargets: ['localhost', 'doesntexist.example'],
browserTracingOptions: {
_experiments: {
// This lead to some flaky tests, as that is sometimes logged
enableLongTask: false,
},
},
},
ignoreEmberOnErrorWarning: true,
minimumRunloopQueueDuration: 0,
minimumComponentRenderDuration: 0,
};
ENV.sentryDsn = process.env.E2E_TEST_DSN;

if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import loadInitializers from 'ember-load-initializers';
import Resolver from 'ember-resolver';

Sentry.init({
dsn: config.sentryDsn,
tracesSampleRate: 1,
replaysSessionSampleRate: 1,
replaysOnErrorSampleRate: 1,
tracePropagationTargets: ['localhost', 'doesntexist.example'],
tunnel: `http://localhost:3031/`, // proxy server
});
export default class App extends Application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ declare const config: {
podModulePrefix: string;
locationType: 'history' | 'hash' | 'none' | 'auto';
rootURL: string;
sentryDsn: string;
APP: Record<string, unknown>;
};

Expand Down
Loading