Skip to content

ref(core)!: Move shutdownTimeout option type from core to node #15217

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 29, 2025
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
4 changes: 1 addition & 3 deletions packages/browser/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export function applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOpt
release:
typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value
? __SENTRY_RELEASE__
: WINDOW.SENTRY_RELEASE?.id // This supports the variable that sentry-webpack-plugin injects
? WINDOW.SENTRY_RELEASE.id
: undefined,
: WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects
sendClientReports: true,
};

Expand Down
9 changes: 0 additions & 9 deletions packages/core/src/types-hoist/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,6 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
*/
normalizeMaxBreadth?: number;

/**
* Controls how many milliseconds to wait before shutting down. The default is
* SDK-specific but typically around 2 seconds. Setting this too low can cause
* problems for sending events from command line applications. Setting it too
* high can cause the application to block for users with network connectivity
* problems.
*/
shutdownTimeout?: number;

/**
* A pattern for error messages which should not be sent to Sentry.
* By default, all errors will be sent.
Expand Down
8 changes: 8 additions & 0 deletions packages/node/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ export interface BaseNodeOptions {
*/
disableInstrumentationWarnings?: boolean;

/**
* Controls how many milliseconds to wait before shutting down. The default is 2 seconds. Setting this too low can cause
* problems for sending events from command line applications. Setting it too
* high can cause the application to block for users with network connectivity
* problems.
*/
shutdownTimeout?: number;

/** Callback that is executed when a fatal global error occurs. */
onFatalError?(this: void, error: Error): void;
}
Expand Down
Loading