-
Notifications
You must be signed in to change notification settings - Fork 60
RumConfiguration.Builder
A Builder class for a RumConfiguration.
applicationId | your applicationId for RUM events |
constructor(applicationId: String)
applicationId | your applicationId for RUM events |
fun build(): RumConfiguration
Builds a RumConfiguration based on the current state of this Builder.
fun disableUserInteractionTracking(): RumConfiguration.Builder
Disable the user interaction automatic tracker.
fun setActionEventMapper(eventMapper: EventMapper<ActionEvent>): RumConfiguration.Builder
Sets the EventMapper for the RUM ActionEvent. You can use this interface implementation to modify the ActionEvent attributes before serialisation.
eventMapper | the EventMapper implementation. |
fun setErrorEventMapper(eventMapper: EventMapper<ErrorEvent>): RumConfiguration.Builder
Sets the EventMapper for the RUM ErrorEvent. You can use this interface implementation to modify the ErrorEvent attributes before serialisation.
eventMapper | the EventMapper implementation. |
fun setLongTaskEventMapper(eventMapper: EventMapper<LongTaskEvent>): RumConfiguration.Builder
Sets the EventMapper for the RUM LongTaskEvent. You can use this interface implementation to modify the LongTaskEvent attributes before serialisation.
eventMapper | the EventMapper implementation. |
fun setResourceEventMapper(eventMapper: EventMapper<ResourceEvent>): RumConfiguration.Builder
Sets the EventMapper for the RUM ResourceEvent. You can use this interface implementation to modify the ResourceEvent attributes before serialisation.
eventMapper | the EventMapper implementation. |
fun setSessionListener(sessionListener: RumSessionListener): RumConfiguration.Builder
Sets the Session listener.
sessionListener | the listener to notify whenever a new Session starts. |
fun setSessionSampleRate(@FloatRange(from = 0.0, to = 100.0)sampleRate: Float): RumConfiguration.Builder
Sets the sample rate for RUM Sessions.
sampleRate | the sample rate must be a value between 0 and 100. A value of 0 means no RUM event will be sent, 100 means all sessions will be kept. |
fun setTelemetrySampleRate(@FloatRange(from = 0.0, to = 100.0)sampleRate: Float): RumConfiguration.Builder
Sets the sample rate for Internal Telemetry (info related to the work of the SDK internals). Default value is 20.
sampleRate | the sample rate must be a value between 0 and 100. A value of 0 means no telemetry will be sent, 100 means all telemetry will be kept. |
fun setViewEventMapper(eventMapper: ViewEventMapper): RumConfiguration.Builder
Sets the ViewEventMapper for the RUM ViewEvent. You can use this interface implementation to modify the ViewEvent attributes before serialisation.
eventMapper | the ViewEventMapper implementation. |
fun setVitalsUpdateFrequency(frequency: VitalsUpdateFrequency): RumConfiguration.Builder
Allows to specify the frequency at which to update the mobile vitals data provided in the RUM ViewEvent.
frequency | as VitalsUpdateFrequency |
VitalsUpdateFrequency |
fun trackBackgroundEvents(enabled: Boolean): RumConfiguration.Builder
Enables/Disables tracking RUM event when no Activity is in foreground.
By default, background events are not tracked. Enabling this feature might increase the number of sessions tracked and impact your billing.
enabled | whether background events should be tracked in RUM. |
fun trackFrustrations(enabled: Boolean): RumConfiguration.Builder
Enables/Disables tracking of frustration signals.
By default frustration signals are tracked. Currently the SDK supports detecting error taps which occur when an error follows a user action tap.
enabled | whether frustration signals should be tracked in RUM. |
fun trackLongTasks(longTaskThresholdMs: Long = RumFeature.DEFAULT_LONG_TASK_THRESHOLD_MS): RumConfiguration.Builder
Enable long operations on the main thread to be tracked automatically. Any long running operation on the main thread will appear as Long Tasks in Datadog RUM Explorer
longTaskThresholdMs | the threshold in milliseconds above which a task running on the Main thread Looper is considered as a long task (default 100ms). Setting a value less than or equal to 0 disables the long task tracking |
fun trackNonFatalAnrs(enabled: Boolean): RumConfiguration.Builder
Enable tracking of non-fatal ANRs. This is enabled by default on Android API 29 and below, and disabled by default on Android API 30 and above. Android API 30+ has a capability to report fatal ANRs (always enabled). Please note, that tracking non-fatal ANRs is using Watchdog thread approach, which can be noisy, and also leads to ANR duplication on Android 30+ if fatal ANR happened, because Watchdog thread approach cannot categorize ANR as fatal or non-fatal.
enabled | whether tracking of non-fatal ANRs is enabled or not. |
fun trackUserInteractions(touchTargetExtraAttributesProviders: Array<ViewAttributesProvider> = emptyArray(), interactionPredicate: InteractionPredicate = NoOpInteractionPredicate()): RumConfiguration.Builder
Enable the user interaction automatic tracker. By enabling this feature the SDK will intercept UI interaction events (e.g.: taps, scrolls, swipes) and automatically send those as RUM UserActions for you.
touchTargetExtraAttributesProviders | an array with your own implementation of the target attributes provider. |
interactionPredicate | an interface to provide custom values for the actions events properties. |
ViewAttributesProvider |
InteractionPredicate |
fun useCustomEndpoint(endpoint: String): RumConfiguration.Builder
Let the RUM feature target a custom server.
fun useViewTrackingStrategy(strategy: ViewTrackingStrategy?): RumConfiguration.Builder
Sets the automatic view tracking strategy used by the SDK. By default ActivityViewTrackingStrategy will be used.
strategy | as the ViewTrackingStrategy Note: If null is passed, the RUM Monitor will let you handle View events manually. This means that you should call RumMonitor.startView and RumMonitor.stopView yourself. A view should be started when it becomes visible and interactive (equivalent to onResume ) and be stopped when it's paused (equivalent to onPause ). |
ActivityViewTrackingStrategy |
FragmentViewTrackingStrategy |
MixedViewTrackingStrategy |
NavigationViewTrackingStrategy |
- Datadog
- DatadogSite
- _InternalProxy
- InternalLogger
- SdkCore
- DatadogContext
- DeviceInfo
- DeviceType
- NetworkInfo
- ProcessInfo
- TimeInfo
- UserInfo
- Feature
- FeatureContextUpdateReceiver
- FeatureEventReceiver
- FeatureScope
- FeatureSdkCore
- StorageBackedFeature
- Request
- RequestFactory
- DataWriter
- EventBatchWriter
- EventType
- FeatureStorageConfiguration
- RawBatchEvent
- DataStoreHandler
- DataStoreReadCallback
- DataStoreWriteCallback
- InternalSdkCore
- SdkReference
- BackPressureMitigation
- BackPressureStrategy
- BatchProcessingLevel
- BatchSize
- Configuration
- HostsSanitizer
- UploadFrequency
- UploadSchedulerStrategy
- DataConstraints
- DatadogDataConstraints
- ThreadDump
- DefaultFirstPartyHostHeaderTypeResolver
- FirstPartyHostHeaderTypeResolver
- Deserializer
- BuildSdkVersionProvider
- JsonSerializer
- MethodCallSamplingRate
- PerformanceMetric
- TelemetryMetricType
- PersistenceStrategy
- Serializer
- DataStoreContent
- RateBasedSampler
- Sampler
- FlushableExecutorService
- EventMapper
- MapperSerializer
- NoOpEventMapper
- LogAttributes
- TrackingConsent
- TrackingConsentProviderCallback
- Encryption
- TracingHeaderType
- DdRumContentProvider
- GlobalRumMonitor
- Rum
- RumActionType
- RumAttributes
- RumConfiguration
- RumErrorSource
- RumMonitor
- RumPerformanceMetric
- RumResourceAttributesProvider
- RumResourceKind
- RumResourceMethod
- RumSessionListener
- _RumInternalProxy
- VitalsUpdateFrequency
- ViewEventMapper
- ResourceTiming
- AdvancedNetworkRumMonitor
- ResourceId
- RumResourceInputStream
- AcceptAllActivities
- AcceptAllDefaultFragment
- AcceptAllNavDestinations
- AcceptAllSupportFragments
- ActivityLifecycleTrackingStrategy
- ActivityViewTrackingStrategy
- ComponentPredicate
- FragmentViewTrackingStrategy
- InteractionPredicate
- MixedViewTrackingStrategy
- NavigationViewTrackingStrategy
- TrackingStrategy
- ViewAttributesProvider
- ViewTrackingStrategy
- DatadogDatabaseErrorHandler
- ActionEvent
- ErrorEvent
- LongTaskEvent
- ResourceEvent
- ViewEvent
- TelemetryConfigurationEvent
- TelemetryDebugEvent
- TelemetryErrorEvent
- ExtensionSupport
- ImagePrivacy
- MapperTypeWrapper
- SessionReplay
- SessionReplayConfiguration
- SessionReplayPrivacy
- MappingContext
- OptionSelectorDetector
- SystemInformation
- BaseAsyncBackgroundWireframeMapper
- BaseViewGroupMapper
- BaseWireframeMapper
- EditTextMapper
- TextViewMapper
- TraverseAllChildrenMapper
- WireframeMapper
- AndroidMDrawableToColorMapper
- AndroidQDrawableToColorMapper
- AsyncJobStatusCallback
- ColorStringFormatter
- DefaultColorStringFormatter
- DefaultViewBoundsResolver
- DefaultViewIdentifierResolver
- DrawableToColorMapper
- GlobalBounds
- ImageWireframeHelper
- LegacyDrawableToColorMapper
- ViewBoundsResolver
- ViewIdentifierResolver
- MobileSegment
- ResourceHashesEntry
- ResourceMetadata