Skip to content

Commit f601cb5

Browse files
committed
remove default core options
1 parent 4cab1b2 commit f601cb5

File tree

5 files changed

+8
-26
lines changed

5 files changed

+8
-26
lines changed

packages/browser/src/sdk.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defaultCoreOptions, getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';
1+
import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';
22
import { getIntegrationsToSetup } from '@sentry/core/build/types/integration';
33
import { Hub } from '@sentry/types';
44
import {
@@ -108,7 +108,6 @@ export function init(options: BrowserOptions = {}): void {
108108

109109
const clientOptions: BrowserClientOptions = {
110110
...options,
111-
...defaultCoreOptions,
112111
stackParser: stackParserFromOptions(options),
113112
integrations: getIntegrationsToSetup(options),
114113
transport,

packages/core/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export { initAndBind } from './sdk';
3737
export { NoopTransport } from './transports/noop';
3838
export { createTransport } from './transports/base';
3939
export { SDK_VERSION } from './version';
40-
export { defaultCoreOptions } from './options';
4140

4241
import * as Integrations from './integrations';
4342

packages/core/src/options.ts

-15
This file was deleted.

packages/node/src/sdk.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defaultCoreOptions, getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';
1+
import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';
22
import { getIntegrationsToSetup } from '@sentry/core/build/types/integration';
33
import { getMainCarrier, setHubOnCarrier } from '@sentry/hub';
44
import { SessionStatus } from '@sentry/types';
@@ -137,7 +137,6 @@ export function init(options: NodeOptions = {}): void {
137137
// TODO(v7): Refactor this to reduce the logic above
138138
const clientOptions: NodeClientOptions = {
139139
...options,
140-
...defaultCoreOptions,
141140
stackParser: stackParserFromOptions(options),
142141
integrations: getIntegrationsToSetup(options),
143142
transport,

packages/types/src/options.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ export interface ClientOptions {
9494
* The maximum number of breadcrumbs sent with events. Defaults to 100.
9595
* Values over 100 will be ignored and 100 used instead.
9696
*/
97-
maxBreadcrumbs: number;
97+
maxBreadcrumbs?: number;
9898

9999
/** A global sample rate to apply to all events (0 - 1). */
100-
sampleRate: number;
100+
sampleRate?: number;
101101

102102
/** Maximum number of chars a single value can have before it will be truncated. */
103-
maxValueLength: number;
103+
maxValueLength?: number;
104104

105105
/**
106106
* Maximum number of levels that normalization algorithm will traverse in objects and arrays.
@@ -111,7 +111,7 @@ export interface ClientOptions {
111111
* - `extra`
112112
* Defaults to `3`. Set to `0` to disable.
113113
*/
114-
normalizeDepth: number;
114+
normalizeDepth?: number;
115115

116116
/**
117117
* Maximum number of properties or elements that the normalization algorithm will output in any single array or object included in the normalized event.
@@ -122,7 +122,7 @@ export interface ClientOptions {
122122
* - `extra`
123123
* Defaults to `1000`
124124
*/
125-
normalizeMaxBreadth: number;
125+
normalizeMaxBreadth?: number;
126126

127127
/**
128128
* Controls how many milliseconds to wait before shutting down. The default is
@@ -131,7 +131,7 @@ export interface ClientOptions {
131131
* high can cause the application to block for users with network connectivity
132132
* problems.
133133
*/
134-
shutdownTimeout: number;
134+
shutdownTimeout?: number;
135135

136136
/**
137137
* A pattern for error messages which should not be sent to Sentry.

0 commit comments

Comments
 (0)