Skip to content

Commit 1ed3705

Browse files
authored
types(browser): Add browser profiling client options (#8565)
Adds the profilesSampleRate type to browser client options.
1 parent 68c4491 commit 1ed3705

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

packages/browser/src/client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Scope } from '@sentry/core';
22
import { BaseClient, SDK_VERSION } from '@sentry/core';
33
import type {
4+
BrowserClientProfilingOptions,
45
BrowserClientReplayOptions,
56
ClientOptions,
67
Event,
@@ -23,7 +24,9 @@ import { createUserFeedbackEnvelope } from './userfeedback';
2324
* Configuration options for the Sentry Browser SDK.
2425
* @see @sentry/types Options for more information.
2526
*/
26-
export type BrowserOptions = Options<BrowserTransportOptions> & BrowserClientReplayOptions;
27+
export type BrowserOptions = Options<BrowserTransportOptions> &
28+
BrowserClientReplayOptions &
29+
BrowserClientProfilingOptions;
2730

2831
/**
2932
* Configuration options for the Sentry Browser SDK Client class

packages/types/src/browseroptions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ export type BrowserClientReplayOptions = {
1616
*/
1717
replaysOnErrorSampleRate?: number;
1818
};
19+
20+
export type BrowserClientProfilingOptions = {
21+
/**
22+
* The sample rate for profiling
23+
* 1.0 will profile all transactions and 0 will profile none.
24+
*/
25+
profilesSampleRate?: number;
26+
};

packages/types/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ export type { WrappedFunction } from './wrappedfunction';
115115
export type { Instrumenter } from './instrumenter';
116116
export type { HandlerDataFetch, HandlerDataXhr, SentryXhrData, SentryWrappedXMLHttpRequest } from './instrument';
117117

118-
export type { BrowserClientReplayOptions } from './browseroptions';
118+
export type { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './browseroptions';
119119
export type { CheckIn, MonitorConfig, SerializedCheckIn } from './checkin';

0 commit comments

Comments
 (0)