Skip to content

Commit 2234e92

Browse files
authored
feat: Update JavaScript SDKs to v10.49.0 (#1355)
1 parent d8b098e commit 2234e92

8 files changed

Lines changed: 199 additions & 395 deletions

File tree

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@
105105
"e2e": "xvfb-maybe vitest run --root=./test/e2e --silent=false --disable-console-intercept"
106106
},
107107
"dependencies": {
108-
"@sentry/browser": "10.47.0",
109-
"@sentry/core": "10.47.0",
110-
"@sentry/node": "10.47.0"
108+
"@sentry/browser": "10.49.0",
109+
"@sentry/core": "10.49.0",
110+
"@sentry/node": "10.49.0"
111111
},
112112
"peerDependencies": {
113-
"@sentry/node-native": "10.47.0"
113+
"@sentry/node-native": "10.49.0"
114114
},
115115
"peerDependenciesMeta": {
116116
"@sentry/node-native": {
@@ -119,9 +119,9 @@
119119
},
120120
"devDependencies": {
121121
"@rollup/plugin-typescript": "^12.1.3",
122-
"@sentry-internal/typescript": "10.47.0",
123-
"@sentry-internal/eslint-plugin-sdk": "10.47.0",
124-
"@sentry/node-native": "10.47.0",
122+
"@sentry-internal/typescript": "10.49.0",
123+
"@sentry-internal/eslint-plugin-sdk": "10.49.0",
124+
"@sentry/node-native": "10.49.0",
125125
"@types/busboy": "^1.5.4",
126126
"@types/koa": "^2.0.52",
127127
"@types/koa-bodyparser": "^4.3.0",

scripts/check-exports.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ignoredBrowser = [
3838
// Electron sends via main process
3939
'diagnoseSdkConnectivity',
4040
// Electron captures this from the main process
41-
'cultureContextIntegration'
41+
'cultureContextIntegration',
4242
];
4343

4444
const ignoredNode = [
@@ -56,7 +56,8 @@ const ignoredNode = [
5656
'anrIntegration',
5757
'disableAnrDetectionForCallback',
5858
// Electron has it's own session handling
59-
'processSessionIntegration'
59+
'processSessionIntegration',
60+
'_INTERNAL_normalizeCollectionInterval',
6061
];
6162

6263
const ignoredUtility = [...ignoredNode];

src/main/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export {
8282
initOpenTelemetry,
8383
instrumentAnthropicAiClient,
8484
instrumentGoogleGenAIClient,
85+
instrumentLangChainEmbeddings,
8586
instrumentLangGraph,
8687
instrumentOpenAiClient,
8788
instrumentStateGraphCompile,
@@ -145,6 +146,7 @@ export {
145146
setupHonoErrorHandler,
146147
setupKoaErrorHandler,
147148
setUser,
149+
spanStreamingIntegration,
148150
spanToBaggageHeader,
149151
spanToJSON,
150152
spanToTraceHeader,
@@ -168,6 +170,7 @@ export {
168170
withIsolationScope,
169171
withMonitor,
170172
withScope,
173+
withStreamedSpan,
171174
wrapMcpServerWithSentry,
172175
zodErrorsIntegration,
173176
} from '@sentry/node';

src/renderer/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ export {
8080
inboundFiltersIntegration,
8181
instrumentAnthropicAiClient,
8282
instrumentGoogleGenAIClient,
83+
instrumentLangChainEmbeddings,
8384
instrumentLangGraph,
8485
instrumentOpenAiClient,
8586
instrumentOutgoingRequests,
8687
instrumentSupabaseClient,
88+
isBotUserAgent,
8789
isEnabled,
8890
isInitialized,
8991
lastEventId,
@@ -119,6 +121,7 @@ export {
119121
setTags,
120122
setUser,
121123
showReportDialog,
124+
spanStreamingIntegration,
122125
spanToBaggageHeader,
123126
spanToJSON,
124127
spanToTraceHeader,
@@ -141,6 +144,8 @@ export {
141144
withActiveSpan,
142145
withIsolationScope,
143146
withScope,
147+
withStreamedSpan,
148+
viewHierarchyIntegration,
144149
zodErrorsIntegration,
145150
} from '@sentry/browser';
146151

src/renderer/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface ElectronRendererOptions extends Partial<ElectronRendererOptionsInterna
5151
export function init<O extends ElectronRendererOptions>(
5252
options: ElectronRendererOptions & O = {} as ElectronRendererOptions & O,
5353
// This parameter name ensures that TypeScript error messages contain a hint for fixing SDK version mismatches
54-
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v10_47_0: O) => void = browserInit,
54+
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v10_49_0: O) => void = browserInit,
5555
): void {
5656
// Ensure the browser SDK is only init'ed once.
5757
if (window?.__SENTRY__RENDERER_INIT__) {

src/utility/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export {
8383
initOpenTelemetry,
8484
instrumentAnthropicAiClient,
8585
instrumentGoogleGenAIClient,
86+
instrumentLangChainEmbeddings,
8687
instrumentLangGraph,
8788
instrumentOpenAiClient,
8889
instrumentStateGraphCompile,
@@ -147,6 +148,7 @@ export {
147148
setupHonoErrorHandler,
148149
setupKoaErrorHandler,
149150
setUser,
151+
spanStreamingIntegration,
150152
spanToBaggageHeader,
151153
spanToJSON,
152154
spanToTraceHeader,
@@ -170,6 +172,7 @@ export {
170172
withIsolationScope,
171173
withMonitor,
172174
withScope,
175+
withStreamedSpan,
173176
wrapMcpServerWithSentry,
174177
zodErrorsIntegration,
175178
} from '@sentry/node';

test/e2e/test-apps/anr/anr-main-native/test.ts

Lines changed: 76 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,85 +7,81 @@ import {
77
UUID_MATCHER,
88
} from '../../..';
99

10-
electronTestRunner(
11-
__dirname,
12-
{ skip: (electronVersion) => electronVersion.major < 28 || electronVersion.major > 37 },
13-
async (ctx) => {
14-
await ctx
15-
.includeSessionEnvelopes()
16-
.ignoreExpectationOrder()
17-
.expect({
18-
envelope: sessionEnvelope({
19-
sid: UUID_MATCHER,
20-
init: true,
21-
started: ISO_DATE_MATCHER,
22-
timestamp: ISO_DATE_MATCHER,
23-
status: 'abnormal',
24-
errors: 0,
25-
duration: expect.any(Number),
26-
abnormal_mechanism: 'anr_foreground',
27-
attrs: expect.objectContaining({
28-
release: 'anr-main-native@1.0.0',
29-
environment: 'development',
30-
}),
10+
electronTestRunner(__dirname, { skip: (electronVersion) => electronVersion.major < 28 }, async (ctx) => {
11+
await ctx
12+
.includeSessionEnvelopes()
13+
.ignoreExpectationOrder()
14+
.expect({
15+
envelope: sessionEnvelope({
16+
sid: UUID_MATCHER,
17+
init: true,
18+
started: ISO_DATE_MATCHER,
19+
timestamp: ISO_DATE_MATCHER,
20+
status: 'abnormal',
21+
errors: 0,
22+
duration: expect.any(Number),
23+
abnormal_mechanism: 'anr_foreground',
24+
attrs: expect.objectContaining({
25+
release: 'anr-main-native@1.0.0',
26+
environment: 'development',
3127
}),
32-
})
33-
.expect({
34-
envelope: eventEnvelopeNoLiveContext({
35-
contexts: {
36-
trace: undefined,
37-
},
38-
breadcrumbs: undefined,
39-
platform: 'node',
40-
level: 'error',
41-
exception: {
42-
values: [
43-
{
44-
type: 'EventLoopBlocked',
45-
value: 'Event Loop Blocked for at least 1000 ms',
46-
thread_id: '0',
47-
stacktrace: {
48-
frames: expect.arrayContaining([
49-
{
50-
filename: expect.stringContaining('app:///src/main.'),
51-
function: 'longWork',
52-
colno: expect.any(Number),
53-
lineno: expect.any(Number),
54-
in_app: true,
55-
},
56-
]),
57-
},
58-
mechanism: { type: 'ANR' },
28+
}),
29+
})
30+
.expect({
31+
envelope: eventEnvelopeNoLiveContext({
32+
contexts: {
33+
trace: undefined,
34+
},
35+
breadcrumbs: undefined,
36+
platform: 'node',
37+
level: 'error',
38+
exception: {
39+
values: [
40+
{
41+
type: 'EventLoopBlocked',
42+
value: 'Event Loop Blocked for at least 1000 ms',
43+
thread_id: '0',
44+
stacktrace: {
45+
frames: expect.arrayContaining([
46+
{
47+
filename: expect.stringContaining('app:///src/main.'),
48+
function: 'longWork',
49+
colno: expect.any(Number),
50+
lineno: expect.any(Number),
51+
in_app: true,
52+
},
53+
]),
5954
},
60-
],
61-
},
62-
threads: {
63-
values: [
64-
{
65-
crashed: true,
66-
current: true,
67-
id: '0',
68-
main: true,
69-
name: 'main',
70-
},
71-
],
72-
},
73-
tags: {
74-
'event.environment': 'javascript',
75-
'event.origin': 'electron',
76-
'event.process': 'browser',
77-
},
78-
debug_meta: {
79-
images: [
80-
{
81-
type: 'sourcemap',
82-
code_file: expect.stringContaining('app:///src/main.'),
83-
debug_id: 'aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaa',
84-
},
85-
],
86-
},
87-
}),
88-
})
89-
.run();
90-
},
91-
);
55+
mechanism: { type: 'ANR' },
56+
},
57+
],
58+
},
59+
threads: {
60+
values: [
61+
{
62+
crashed: true,
63+
current: true,
64+
id: '0',
65+
main: true,
66+
name: 'main',
67+
},
68+
],
69+
},
70+
tags: {
71+
'event.environment': 'javascript',
72+
'event.origin': 'electron',
73+
'event.process': 'browser',
74+
},
75+
debug_meta: {
76+
images: [
77+
{
78+
type: 'sourcemap',
79+
code_file: expect.stringContaining('app:///src/main.'),
80+
debug_id: 'aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaa',
81+
},
82+
],
83+
},
84+
}),
85+
})
86+
.run();
87+
});

0 commit comments

Comments
 (0)