Skip to content

Commit

Permalink
✨add option to opt out of automatic recording
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaudan committed May 30, 2023
1 parent 251aa32 commit 9e3ec07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/rum-core/src/domain/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface RumInitConfiguration extends InitConfiguration {
defaultPrivacyLevel?: DefaultPrivacyLevel | undefined
subdomain?: string
sessionReplaySampleRate?: number | undefined
startSessionReplayRecordingManually?: boolean | undefined

// action options
trackUserInteractions?: boolean | undefined
Expand All @@ -53,6 +54,7 @@ export interface RumConfiguration extends Configuration {
applicationId: string
defaultPrivacyLevel: DefaultPrivacyLevel
sessionReplaySampleRate: number
startSessionReplayRecordingManually: boolean
trackUserInteractions: boolean
trackViewsManually: boolean
trackResources: boolean
Expand Down Expand Up @@ -104,6 +106,7 @@ export function validateAndBuildRumConfiguration(
version: initConfiguration.version,
actionNameAttribute: initConfiguration.actionNameAttribute,
sessionReplaySampleRate: initConfiguration.sessionReplaySampleRate ?? 0,
startSessionReplayRecordingManually: !!initConfiguration.startSessionReplayRecordingManually,
traceSampleRate: initConfiguration.traceSampleRate,
allowedTracingUrls,
excludedActivityUrls: initConfiguration.excludedActivityUrls ?? [],
Expand Down Expand Up @@ -181,6 +184,8 @@ export function serializeRumConfiguration(configuration: RumInitConfiguration):
return assign(
{
session_replay_sample_rate: configuration.sessionReplaySampleRate,
// TODO update format
start_session_replay_recording_manually: configuration.startSessionReplayRecordingManually,
trace_sample_rate: configuration.traceSampleRate,
action_name_attribute: configuration.actionNameAttribute,
use_allowed_tracing_urls:
Expand Down

0 comments on commit 9e3ec07

Please sign in to comment.