Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ setTimeout(() => {

Sentry.init({
dsn: process.env.SENTRY_DSN,
release: '1.0',
release: '1.0.0',
integrations: [Sentry.anrIntegration({ captureStackTrace: true, anrThreshold: 100 })],
});

Expand Down
3 changes: 3 additions & 0 deletions dev-packages/node-integration-tests/suites/anr/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ describe('should report ANR when event loop blocked', () => {
session: {
status: 'abnormal',
abnormal_mechanism: 'anr_foreground',
attrs: {
release: '1.0.0',
},
},
})
.expect({ event: ANR_EVENT_WITH_SCOPE })
Expand Down
8 changes: 7 additions & 1 deletion packages/node/src/integrations/anr/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ async function sendAbnormalSession(): Promise<void> {
// of we have an existing session passed from the main thread, send it as abnormal
if (session) {
log('Sending abnormal session');
updateSession(session, { status: 'abnormal', abnormal_mechanism: 'anr_foreground' });

updateSession(session, {
status: 'abnormal',
abnormal_mechanism: 'anr_foreground',
release: options.release,
environment: options.environment,
});

const envelope = createSessionEnvelope(session, options.dsn, options.sdkMetadata, options.tunnel);
// Log the envelope so to aid in testing
Expand Down
Loading