From a3abff15934662f0901e3ce63b665362ff0d48f6 Mon Sep 17 00:00:00 2001 From: JonasBa Date: Mon, 17 Jul 2023 15:30:22 -0400 Subject: [PATCH 1/2] types(browser): add browser profiling client options --- packages/browser/src/client.ts | 5 ++++- packages/types/src/browseroptions.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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; +}; From 5f5e9d9422fcdb815748be56184087e423c456d3 Mon Sep 17 00:00:00 2001 From: JonasBa Date: Wed, 19 Jul 2023 08:16:36 -0400 Subject: [PATCH 2/2] fix(types): add export to index.tsx --- packages/types/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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';