Skip to content

Commit 98c5787

Browse files
authored
feat: Update JavaScript SDKs to v10.38.0 (#1306)
1 parent 5250f33 commit 98c5787

7 files changed

Lines changed: 289 additions & 278 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.36.0",
109-
"@sentry/core": "10.36.0",
110-
"@sentry/node": "10.36.0"
108+
"@sentry/browser": "10.38.0",
109+
"@sentry/core": "10.38.0",
110+
"@sentry/node": "10.38.0"
111111
},
112112
"peerDependencies": {
113-
"@sentry/node-native": "10.36.0"
113+
"@sentry/node-native": "10.38.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.36.0",
123-
"@sentry-internal/eslint-config-sdk": "10.36.0",
124-
"@sentry-internal/typescript": "10.36.0",
122+
"@sentry/node-native": "10.38.0",
123+
"@sentry-internal/eslint-config-sdk": "10.38.0",
124+
"@sentry-internal/typescript": "10.38.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: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
export type {
22
Breadcrumb,
33
BreadcrumbHint,
4-
PolymorphicRequest,
5-
SdkInfo,
4+
ErrorEvent,
65
Event,
76
EventHint,
8-
ErrorEvent,
97
Exception,
8+
PolymorphicRequest,
9+
SdkInfo,
1010
Session,
1111
SeverityLevel,
12+
Span,
1213
StackFrame,
1314
Stacktrace,
1415
Thread,
1516
User,
16-
Span,
1717
} from '@sentry/core';
1818

1919
export {
@@ -80,19 +80,23 @@ export {
8080
// eslint-disable-next-line deprecation/deprecation
8181
inboundFiltersIntegration,
8282
initOpenTelemetry,
83+
instrumentAnthropicAiClient,
84+
instrumentGoogleGenAIClient,
85+
instrumentLangGraph,
8386
instrumentOpenAiClient,
87+
instrumentStateGraphCompile,
8488
instrumentSupabaseClient,
8589
isEnabled,
8690
isInitialized,
8791
kafkaIntegration,
8892
knexIntegration,
8993
koaIntegration,
94+
langChainIntegration,
9095
langGraphIntegration,
9196
lastEventId,
9297
launchDarklyIntegration,
9398
linkedErrorsIntegration,
9499
localVariablesIntegration,
95-
langChainIntegration,
96100
logger,
97101
lruMemoizerIntegration,
98102
metrics,
@@ -123,6 +127,7 @@ export {
123127
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
124128
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
125129
SentryContextManager,
130+
setConversationId,
126131
setContext,
127132
setCurrentClient,
128133
setExtra,
@@ -168,29 +173,29 @@ export {
168173

169174
export type { NodeOptions } from '@sentry/node';
170175

171-
export { electronBreadcrumbsIntegration } from './integrations/electron-breadcrumbs.js';
172-
export { onUncaughtExceptionIntegration } from './integrations/onuncaughtexception.js';
173-
export { sentryMinidumpIntegration } from './integrations/sentry-minidump/index.js';
174-
export { electronMinidumpIntegration } from './integrations/electron-minidump.js';
175-
export { preloadInjectionIntegration } from './integrations/preload-injection.js';
176-
export { mainProcessSessionIntegration } from './integrations/main-process-session.js';
177-
export { browserWindowSessionIntegration } from './integrations/browser-window-session.js';
178176
export { additionalContextIntegration } from './integrations/additional-context.js';
179-
export { electronNetIntegration } from './integrations/net-breadcrumbs.js';
177+
export { browserWindowSessionIntegration } from './integrations/browser-window-session.js';
180178
export { childProcessIntegration } from './integrations/child-process.js';
181-
export { screenshotsIntegration } from './integrations/screenshots.js';
182-
export { rendererProfileFromIpc } from './integrations/renderer-profiling.js';
183-
export { normalizePathsIntegration } from './integrations/normalize-paths.js';
179+
export { electronBreadcrumbsIntegration } from './integrations/electron-breadcrumbs.js';
184180
export { electronContextIntegration } from './integrations/electron-context.js';
181+
export { electronMinidumpIntegration } from './integrations/electron-minidump.js';
182+
export { electronNetIntegration } from './integrations/net-breadcrumbs.js';
185183
export { gpuContextIntegration } from './integrations/gpu-context.js';
184+
export { mainProcessSessionIntegration } from './integrations/main-process-session.js';
185+
export { normalizePathsIntegration } from './integrations/normalize-paths.js';
186+
export { onUncaughtExceptionIntegration } from './integrations/onuncaughtexception.js';
187+
export { preloadInjectionIntegration } from './integrations/preload-injection.js';
186188
export { rendererEventLoopBlockIntegration } from './integrations/renderer-anr.js';
189+
export { rendererProfileFromIpc } from './integrations/renderer-profiling.js';
190+
export { screenshotsIntegration } from './integrations/screenshots.js';
191+
export { sentryMinidumpIntegration } from './integrations/sentry-minidump/index.js';
187192
export { startupTracingIntegration } from './integrations/startup-tracing.js';
188193

189-
export { makeElectronTransport } from './transports/electron-net.js';
190194
export { makeElectronOfflineTransport } from './transports/electron-offline-net.js';
195+
export { makeElectronTransport } from './transports/electron-net.js';
191196

192-
export type { ElectronMainOptions } from './sdk.js';
193-
export { init, getDefaultIntegrations } from './sdk.js';
194197
export { defaultStackParser } from './stack-parse.js';
198+
export type { ElectronMainOptions } from './sdk.js';
199+
export { getDefaultIntegrations, init } from './sdk.js';
195200

196201
export { IPCMode } from '../common/ipc.js';

src/renderer/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export { logger, metrics };
66
export type {
77
Breadcrumb,
88
BreadcrumbHint,
9+
ErrorEvent,
910
Event,
1011
EventHint,
11-
ErrorEvent,
1212
Exception,
1313
SdkInfo,
1414
Session,
@@ -41,9 +41,9 @@ export {
4141
consoleLoggingIntegration,
4242
contextLinesIntegration,
4343
continueTrace,
44-
createTransport,
4544
createConsolaReporter,
4645
createLangChainCallbackHandler,
46+
createTransport,
4747
createUserFeedbackEnvelope,
4848
dedupeIntegration,
4949
defaultRequestInstrumentationOptions,
@@ -144,8 +144,8 @@ export {
144144

145145
export type { BrowserOptions, ReportDialogOptions } from '@sentry/browser';
146146

147-
export { scopeToMainIntegration } from './integrations/scope-to-main.js';
147+
export { electronRendererStackParser as defaultStackParser } from './stack-parse.js';
148148
export { eventLoopBlockIntegration } from './integrations/event-loop-block.js';
149+
export { getDefaultIntegrations, init } from './sdk.js';
149150
export { makeRendererTransport } from './transport.js';
150-
export { electronRendererStackParser as defaultStackParser } from './stack-parse.js';
151-
export { init, getDefaultIntegrations } from './sdk.js';
151+
export { scopeToMainIntegration } from './integrations/scope-to-main.js';

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_36_0: O) => void = browserInit,
54+
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v10_38_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: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
export type {
22
Breadcrumb,
33
BreadcrumbHint,
4-
PolymorphicRequest,
5-
SdkInfo,
4+
ErrorEvent,
65
Event,
76
EventHint,
8-
ErrorEvent,
97
Exception,
8+
PolymorphicRequest,
9+
SdkInfo,
1010
Session,
1111
SeverityLevel,
12+
Span,
1213
StackFrame,
1314
Stacktrace,
1415
Thread,
1516
User,
16-
Span,
1717
} from '@sentry/core';
1818

1919
export {
@@ -81,19 +81,23 @@ export {
8181
// eslint-disable-next-line deprecation/deprecation
8282
inboundFiltersIntegration,
8383
initOpenTelemetry,
84+
instrumentAnthropicAiClient,
85+
instrumentGoogleGenAIClient,
86+
instrumentLangGraph,
8487
instrumentOpenAiClient,
88+
instrumentStateGraphCompile,
8589
instrumentSupabaseClient,
8690
isEnabled,
8791
isInitialized,
8892
kafkaIntegration,
8993
knexIntegration,
9094
koaIntegration,
95+
langChainIntegration,
9196
langGraphIntegration,
9297
lastEventId,
9398
launchDarklyIntegration,
9499
linkedErrorsIntegration,
95100
localVariablesIntegration,
96-
langChainIntegration,
97101
logger,
98102
lruMemoizerIntegration,
99103
metrics,
@@ -125,6 +129,7 @@ export {
125129
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
126130
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
127131
SentryContextManager,
132+
setConversationId,
128133
setContext,
129134
setCurrentClient,
130135
setExtra,
@@ -172,4 +177,4 @@ export type { NodeOptions } from '@sentry/node';
172177

173178
export { makeUtilityProcessTransport } from './transport.js';
174179

175-
export { init, getDefaultIntegrations, defaultStackParser } from './sdk.js';
180+
export { defaultStackParser, getDefaultIntegrations, init } from './sdk.js';

test/e2e/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ export function profileChunkEnvelope(chunk: Partial<ProfileChunk>): Envelope {
378378
},
379379
[
380380
[
381-
{ type: 'profile_chunk' },
381+
{
382+
platform: 'javascript',
383+
type: 'profile_chunk',
384+
},
382385
{
383386
chunk_id: UUID_MATCHER,
384387
profiler_id: UUID_MATCHER,

0 commit comments

Comments
 (0)