Skip to content

Commit a34878a

Browse files
authored
ref(core): Move allowUrls and denyUrls options into core (#6317)
1 parent bb7a021 commit a34878a

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

packages/browser/src/client.ts

+2-18
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,17 @@ import { Breadcrumbs } from './integrations';
88
import { BREADCRUMB_INTEGRATION_ID } from './integrations/breadcrumbs';
99
import { BrowserTransportOptions } from './transports/types';
1010

11-
export interface BaseBrowserOptions {
12-
/**
13-
* A pattern for error URLs which should exclusively be sent to Sentry.
14-
* This is the opposite of {@link Options.denyUrls}.
15-
* By default, all errors will be sent.
16-
*/
17-
allowUrls?: Array<string | RegExp>;
18-
19-
/**
20-
* A pattern for error URLs which should not be sent to Sentry.
21-
* To allow certain errors instead, use {@link Options.allowUrls}.
22-
* By default, all errors will be sent.
23-
*/
24-
denyUrls?: Array<string | RegExp>;
25-
}
26-
2711
/**
2812
* Configuration options for the Sentry Browser SDK.
2913
* @see @sentry/types Options for more information.
3014
*/
31-
export interface BrowserOptions extends Options<BrowserTransportOptions>, BaseBrowserOptions {}
15+
export type BrowserOptions = Options<BrowserTransportOptions>;
3216

3317
/**
3418
* Configuration options for the Sentry Browser SDK Client class
3519
* @see BrowserClient for more information.
3620
*/
37-
export interface BrowserClientOptions extends ClientOptions<BrowserTransportOptions>, BaseBrowserOptions {}
21+
export type BrowserClientOptions = ClientOptions<BrowserTransportOptions>;
3822

3923
/**
4024
* The Sentry Browser SDK Client.

packages/types/src/options.ts

+18
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,24 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
190190
[key: string]: any;
191191
};
192192

193+
/**
194+
* A pattern for error URLs which should exclusively be sent to Sentry.
195+
* This is the opposite of {@link Options.denyUrls}.
196+
* By default, all errors will be sent.
197+
*
198+
* Requires the use of the `InboundFilters` integration.
199+
*/
200+
allowUrls?: Array<string | RegExp>;
201+
202+
/**
203+
* A pattern for error URLs which should not be sent to Sentry.
204+
* To allow certain errors instead, use {@link Options.allowUrls}.
205+
* By default, all errors will be sent.
206+
*
207+
* Requires the use of the `InboundFilters` integration.
208+
*/
209+
denyUrls?: Array<string | RegExp>;
210+
193211
/**
194212
* Function to compute tracing sample rate dynamically and filter unwanted traces.
195213
*

0 commit comments

Comments
 (0)