Skip to content

Commit f73d5d4

Browse files
authored
feat: Update JavaScript SDKs to v10.17.0 (#1247)
1 parent 1093760 commit f73d5d4

File tree

11 files changed

+280
-273
lines changed

11 files changed

+280
-273
lines changed

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.11.0",
109-
"@sentry/core": "10.11.0",
110-
"@sentry/node": "10.11.0"
108+
"@sentry/browser": "10.17.0",
109+
"@sentry/core": "10.17.0",
110+
"@sentry/node": "10.17.0"
111111
},
112112
"peerDependencies": {
113-
"@sentry/node-native": "10.11.0"
113+
"@sentry/node-native": "10.17.0"
114114
},
115115
"peerDependenciesMeta": {
116116
"@sentry/node-native": {
@@ -119,9 +119,9 @@
119119
},
120120
"devDependencies": {
121121
"@rollup/plugin-typescript": "^12.1.3",
122-
"@sentry/node-native": "10.11.0",
123-
"@sentry-internal/eslint-config-sdk": "10.11.0",
124-
"@sentry-internal/typescript": "10.11.0",
122+
"@sentry/node-native": "10.17.0",
123+
"@sentry-internal/eslint-config-sdk": "10.17.0",
124+
"@sentry-internal/typescript": "10.17.0",
125125
"@types/busboy": "^1.5.4",
126126
"@types/koa": "^2.0.52",
127127
"@types/koa-bodyparser": "^4.3.0",

src/main/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export {
3636
consoleLoggingIntegration,
3737
contextLinesIntegration,
3838
continueTrace,
39+
createConsolaReporter,
3940
createGetModuleFromFilename,
4041
createSentryWinstonTransport,
4142
createTransport,
@@ -66,10 +67,14 @@ export {
6667
getSpanStatusFromHttpCode,
6768
getTraceData,
6869
getTraceMetaTags,
70+
googleGenAIIntegration,
6971
graphqlIntegration,
7072
hapiIntegration,
73+
honoIntegration,
7174
httpHeadersToSpanAttributes,
7275
httpIntegration,
76+
httpServerIntegration,
77+
httpServerSpansIntegration,
7378
// eslint-disable-next-line deprecation/deprecation
7479
inboundFiltersIntegration,
7580
initOpenTelemetry,
@@ -124,6 +129,7 @@ export {
124129
setupExpressErrorHandler,
125130
setupFastifyErrorHandler,
126131
setupHapiErrorHandler,
132+
setupHonoErrorHandler,
127133
setupKoaErrorHandler,
128134
setUser,
129135
spanToBaggageHeader,

src/main/integrations/renderer-anr.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ export const rendererEventLoopBlockIntegration: (options?: Options) => RendererE
285285
* Creates a hook which notifies the integration when the state of renderers change
286286
*/
287287
export function createRendererEventLoopBlockStatusHandler(client: Client): RendererStatusHandler | undefined {
288-
const integration = client.getIntegrationByName(INTEGRATION_NAME) as RendererEventLoopBlockIntegration | undefined;
288+
const integration = client.getIntegrationByName(INTEGRATION_NAME) as unknown as
289+
| RendererEventLoopBlockIntegration
290+
| undefined;
289291
return integration?.createRendererEventLoopBlockStatusHandler();
290292
}

src/main/integrations/renderer-profiling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const rendererProfilingIntegration = defineIntegration(() => {
6262
const event = item[j] as Event;
6363

6464
if (event?.contexts?.profile?.profile_id) {
65-
profile_id = event.contexts.profile.profile_id as string;
65+
profile_id = event.contexts.profile.profile_id;
6666
// This can be removed as it's no longer needed
6767
delete event.contexts.profile;
6868
}

src/renderer/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export {
4040
contextLinesIntegration,
4141
continueTrace,
4242
createTransport,
43+
createConsolaReporter,
4344
createUserFeedbackEnvelope,
4445
dedupeIntegration,
4546
defaultRequestInstrumentationOptions,
@@ -89,13 +90,15 @@ export {
8990
replayCanvasIntegration,
9091
replayIntegration,
9192
reportingObserverIntegration,
93+
reportPageLoaded,
9294
rewriteFramesIntegration,
9395
Scope,
9496
SEMANTIC_ATTRIBUTE_SENTRY_OP,
9597
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
9698
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
9799
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
98100
sendFeedback,
101+
setActiveSpanInBrowser,
99102
setContext,
100103
setCurrentClient,
101104
setExtra,

src/renderer/log.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ function captureLog(
1818
const client = getClient();
1919
_INTERNAL_captureLog(
2020
{ level, message, attributes, severityNumber },
21-
client,
2221
getCurrentScope(),
2322
(_: unknown, log: SerializedLog) => getIPC(client).sendStructuredLog(log),
2423
);

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_11_0: O) => void = browserInit,
54+
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v10_17_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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export {
3737
consoleLoggingIntegration,
3838
contextLinesIntegration,
3939
continueTrace,
40+
createConsolaReporter,
4041
createGetModuleFromFilename,
4142
createSentryWinstonTransport,
4243
createTransport,
@@ -67,10 +68,14 @@ export {
6768
getSpanStatusFromHttpCode,
6869
getTraceData,
6970
getTraceMetaTags,
71+
googleGenAIIntegration,
7072
graphqlIntegration,
7173
hapiIntegration,
74+
honoIntegration,
7275
httpHeadersToSpanAttributes,
7376
httpIntegration,
77+
httpServerIntegration,
78+
httpServerSpansIntegration,
7479
// eslint-disable-next-line deprecation/deprecation
7580
inboundFiltersIntegration,
7681
initOpenTelemetry,
@@ -126,6 +131,7 @@ export {
126131
setupExpressErrorHandler,
127132
setupFastifyErrorHandler,
128133
setupHapiErrorHandler,
134+
setupHonoErrorHandler,
129135
setupKoaErrorHandler,
130136
setUser,
131137
spanToBaggageHeader,

test/e2e/test-apps/javascript/main-unhandledrejection/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ electronTestRunner(__dirname, async (ctx) => {
2727
},
2828
]),
2929
},
30-
mechanism: { type: 'onunhandledrejection', handled: false },
30+
mechanism: { type: 'auto.node.onunhandledrejection', handled: false },
3131
},
3232
],
3333
},

test/e2e/test-apps/other/utility-process/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ electronTestRunner(__dirname, { skipEsmAutoTransform: true }, async (ctx) => {
2525
},
2626
mechanism: {
2727
handled: false,
28-
type: 'onuncaughtexception',
28+
type: 'auto.node.onuncaughtexception',
2929
},
3030
},
3131
],

0 commit comments

Comments
 (0)