Skip to content

Commit 6c655db

Browse files
authored
feat(node-core,bun): Export processSessionIntegration from node-core and add it to bun (#18852)
Closes: #18516
1 parent 70a309f commit 6c655db

File tree

8 files changed

+11
-3
lines changed

8 files changed

+11
-3
lines changed

packages/astro/src/index.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export {
101101
postgresIntegration,
102102
postgresJsIntegration,
103103
prismaIntegration,
104+
processSessionIntegration,
104105
childProcessIntegration,
105106
createSentryWinstonTransport,
106107
redisIntegration,

packages/aws-serverless/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export {
112112
pinoIntegration,
113113
postgresIntegration,
114114
postgresJsIntegration,
115+
processSessionIntegration,
115116
prismaIntegration,
116117
childProcessIntegration,
117118
createSentryWinstonTransport,

packages/bun/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export {
136136
postgresIntegration,
137137
postgresJsIntegration,
138138
prismaIntegration,
139+
processSessionIntegration,
139140
hapiIntegration,
140141
setupHapiErrorHandler,
141142
honoIntegration,

packages/bun/src/sdk.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
nodeContextIntegration,
2121
onUncaughtExceptionIntegration,
2222
onUnhandledRejectionIntegration,
23+
processSessionIntegration,
2324
} from '@sentry/node';
2425
import { bunServerIntegration } from './integrations/bunserver';
2526
import { makeFetchTransport } from './transports';
@@ -47,6 +48,7 @@ export function getDefaultIntegrations(_options: Options): Integration[] {
4748
contextLinesIntegration(),
4849
nodeContextIntegration(),
4950
modulesIntegration(),
51+
processSessionIntegration(),
5052
// Bun Specific
5153
bunServerIntegration(),
5254
...(hasSpansEnabled(_options) ? getAutoPerformanceIntegrations() : []),

packages/bun/test/sdk.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ describe('Bun SDK', () => {
3737

3838
await new Promise(resolve => setTimeout(resolve, 1000));
3939

40-
expect(envelopes.length).toBe(1);
40+
const errorEnvelope = envelopes.find(envelope => envelope?.[1][0]?.[0]?.type === 'event');
41+
expect(errorEnvelope).toBeDefined();
4142

42-
const envelope = envelopes[0];
43-
const event = envelope?.[1][0][1] as Event;
43+
const event = errorEnvelope?.[1][0][1] as Event;
4444

4545
expect(event.sdk?.name).toBe('sentry.javascript.bun');
4646

packages/google-cloud-serverless/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export {
113113
postgresIntegration,
114114
postgresJsIntegration,
115115
prismaIntegration,
116+
processSessionIntegration,
116117
hapiIntegration,
117118
setupHapiErrorHandler,
118119
honoIntegration,

packages/node-core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export { anrIntegration, disableAnrDetectionForCallback } from './integrations/a
2626
export { spotlightIntegration } from './integrations/spotlight';
2727
export { systemErrorIntegration } from './integrations/systemError';
2828
export { childProcessIntegration } from './integrations/childProcess';
29+
export { processSessionIntegration } from './integrations/processSession';
2930
export { createSentryWinstonTransport } from './integrations/winston';
3031
export { pinoIntegration } from './integrations/pino';
3132

packages/node/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export {
182182
disableAnrDetectionForCallback,
183183
spotlightIntegration,
184184
childProcessIntegration,
185+
processSessionIntegration,
185186
pinoIntegration,
186187
createSentryWinstonTransport,
187188
SentryContextManager,

0 commit comments

Comments
 (0)