diff --git a/packages/browser/src/client.ts b/packages/browser/src/client.ts index ab877a782efa..fba5dfc008e6 100644 --- a/packages/browser/src/client.ts +++ b/packages/browser/src/client.ts @@ -1,6 +1,7 @@ import type { Scope } from '@sentry/core'; import { BaseClient, SDK_VERSION } from '@sentry/core'; import type { + BrowserClientProfilingOptions, BrowserClientReplayOptions, ClientOptions, Event, @@ -23,7 +24,9 @@ import { createUserFeedbackEnvelope } from './userfeedback'; * Configuration options for the Sentry Browser SDK. * @see @sentry/types Options for more information. */ -export type BrowserOptions = Options & BrowserClientReplayOptions; +export type BrowserOptions = Options & + BrowserClientReplayOptions & + BrowserClientProfilingOptions; /** * Configuration options for the Sentry Browser SDK Client class diff --git a/packages/types/src/browseroptions.ts b/packages/types/src/browseroptions.ts index 9eeea6350728..63341322ff56 100644 --- a/packages/types/src/browseroptions.ts +++ b/packages/types/src/browseroptions.ts @@ -16,3 +16,11 @@ export type BrowserClientReplayOptions = { */ replaysOnErrorSampleRate?: number; }; + +export type BrowserClientProfilingOptions = { + /** + * The sample rate for profiling + * 1.0 will profile all transactions and 0 will profile none. + */ + profilesSampleRate?: number; +}; diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index d9b55aeef077..5ce2e1fe6ce5 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -115,5 +115,5 @@ export type { WrappedFunction } from './wrappedfunction'; export type { Instrumenter } from './instrumenter'; export type { HandlerDataFetch, HandlerDataXhr, SentryXhrData, SentryWrappedXMLHttpRequest } from './instrument'; -export type { BrowserClientReplayOptions } from './browseroptions'; +export type { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './browseroptions'; export type { CheckIn, MonitorConfig, SerializedCheckIn } from './checkin';