File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
dev-packages/e2e-tests/test-applications/node-profiling Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1205,7 +1205,8 @@ jobs:
1205
1205
- name : Run E2E test
1206
1206
working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1207
1207
timeout-minutes : 10
1208
- run : xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:assert
1208
+ run :
1209
+ xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:assert
1209
1210
1210
1211
job_required_jobs_passed :
1211
1212
name : All required jobs passed or were skipped
Original file line number Diff line number Diff line change
1
+ // This tests asserts that @sentr /profiling-node is not patching globalThis values, which
2
+ // breaks our runtime detection and can break instrumentation
3
+ // https://github.com/getsentry/sentry-javascript/issues/14525#issuecomment-2511208064
4
+
1
5
function assertUnpatechedRequire ( cycle ) {
2
6
if ( globalThis . require !== undefined ) {
3
7
// Test that globalThis.require is not defined by any side effects of the profiling
4
8
// https://github.com/getsentry/sentry-javascript/issues/13662
5
9
throw new Error (
6
- `globalThis.require should not be defined ${ cycle } , check that profiling integration is not defining it, received: ` +
10
+ `globalThis.require should not be defined, check that profiling integration is not defining it, received: ` +
7
11
typeof globalThis . require ,
8
12
) ;
9
13
}
10
14
}
11
15
12
16
import * as Sentry from '@sentry/node' ;
13
17
import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
14
- assertUnpatechedRequire ( 'after importing sentry/profiling-node' ) ;
15
18
const wait = ms => new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
16
19
17
20
Sentry . init ( {
@@ -25,4 +28,4 @@ Sentry.startSpan({ name: 'Precompile test' }, async () => {
25
28
await wait ( 500 ) ;
26
29
} ) ;
27
30
28
- assertUnpatechedRequire ( 'after a span was created' ) ;
31
+ assertUnpatechedRequire ( ) ;
You can’t perform that action at this time.
0 commit comments