Custom Environment Variables¶
Key Fields¶
Web¶
Parameter Name |
Data Type | Description |
|---|---|---|
sessionSampleRate |
number | Data reporting sampling rate. 100 means full collection; 0 means no collection. |
service |
string | The service name of the Web application. |
env |
string | The current environment of the Web application, e.g., prod: production environment; gray: gray environment; pre: pre-release environment; common: daily environment; local: local environment. |
version |
string | The version number of the Web application. |
tracingSampleRate |
number | Link tracing data sampling percentage: 100 means full collection; 0 means no collection. |
usePartitionedCrossSiteSessionCookie |
boolean | Whether to use cross-domain cookies, enabling third-party cookie cross-partitioning. Cross-domain is not allowed by default. |
storeContextsToLocal |
boolean | Whether to store public data in localstorage. Not stored by default. |
storeContextsKey |
string | Defines the key for storing data in localstorage. If left blank, it is auto-generated by default. |
sendContentTypeByJson |
boolean | Data is sent as application/json. Default is text. |
allowFallbackToLocalStorage |
boolean | When cookies are unavailable, this option can be enabled to store data in localstorage. |
sessionOnErrorSampleRate |
number | Error session compensation sampling rate: When a session is not sampled, if an error occurs during the session, it is collected at this rate. 100 means all error sessions are collected, 0 means error sessions are ignored. |
sessionReplaySampleRate |
number | Session Replay full collection sampling rate: Used to control the proportion of full data collection for all session replays. 100 means full collection, 0 means no collection. |
sessionReplayOnErrorSampleRate |
number | Error session replay compensation sampling rate: When a session is not sampled, if an error occurs during the session, it is collected at this rate. 100 means full collection; 0 means no collection. |
trackUserInteractions |
boolean | Whether to enable user interaction collection. |
compressIntakeRequests |
boolean | Compresses RUM data request content to reduce bandwidth usage when sending large amounts of data. Compression is done in a Worker thread. |
traceType |
TraceType | Configures the link tracing tool type, default is ddtrace. Currently supports 6 data types: ddtrace, zipkin, skywalking_v3, jaeger, zipkin_single_header, w3c_traceparent. |
Android¶
Parameter Name |
Data Type | Hot Reloadable | Description |
|---|---|---|---|
env |
string |
❌ | Environment configuration, default prod. Any character, recommended to use a single word, e.g., test. |
serviceName |
string |
❌ | Sets the name of the associated business or service, affecting the service field data in Log and RUM. Default is df_rum_android. |
autoSync |
bool |
✅ | Whether to automatically sync data to the server after collection. Default is true. |
compressIntakeRequests |
bool |
✅ | Compresses upload sync data using deflate. Disabled by default. |
syncPageSize |
int |
✅ | Sets the number of entries per sync request, range [5,∞). Note: Larger request entry counts mean data synchronization consumes more computing resources. |
syncSleepTime |
int |
✅ | Sets the sync interval time, in milliseconds. Range [0,5000]. Not set by default. |
rumSampleRate |
float |
✅ | Sets the RUM sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. Scope applies to all View, Action, LongTask, Error data under the same session_id. Android: ft-sdk > 1.6.16 |
rumSessionOnErrorSampleRate |
float |
✅ | Sets the error collection rate. When a session is not sampled by rumSampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. Scope is the same as rumSampleRate. Android: ft-sdk > 1.6.16 |
rumEnableTraceUserAction |
bool |
❌ | Whether to automatically trace user operations. Currently only supports user launch and click operations. Default is false. |
rumEnableTraceUserView |
bool |
❌ | Whether to automatically trace user page operations. Default is false. |
rumEnableTraceUserResource |
bool |
❌ | Whether to automatically trace user network requests. Only supports OkHttp. Default is false. |
rumEnableResourceHostIP |
bool |
❌ | Whether to collect the IP address of the requested target domain. Scope: Only affects default collection when EnableTraceUserResource is true. Android: A single Okhttp client has an IP caching mechanism for the same domain. The same OkhttpClient will only generate it once if the server IP does not change. |
rumEnableTrackAppUIBlock |
bool |
❌ | Whether to enable UI freeze detection. Default is false. |
rumBlockDurationMs |
int |
❌ | Sets the UI freeze detection threshold, value range [100,∞), unit milliseconds, default 1 second. |
rumEnableTrackAppCrash |
bool |
❌ | Whether to report App crash logs. Default is false. |
rumEnableTrackAppANR |
bool |
❌ | Whether to enable ANR detection. Default is false. |
rumEnableTraceWebView |
bool |
❌ | Whether to enable webview data monitoring. Default is true. |
rumAllowWebViewHost |
string json array |
❌ | Configures allowed webview host addresses for data tracing. No filtering by default. Example: ["10.0.0.1"]. |
logSampleRate |
float |
✅ | Sets the Log sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. Android: ft-sdk > 1.6.16 |
logLevelFilters |
string json array |
✅ | Sets log level filtering. Not set by default. Example: ["info","warn"]. |
logEnableConsoleLog |
bool |
✅ | Whether to report console logs. Only supported on Android. |
logEnableCustomLog |
bool |
✅ | Whether to upload custom logs. Default is false. |
traceSampleRate |
float |
✅ | Sets the trace sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. Android: ft-sdk > 1.6.16 |
traceEnableAutoTrace |
bool |
❌ | Sets whether to enable automatic http trace. Currently only supports automatic tracing for OKhttp. Default is false. |
traceType |
string |
❌ | Sets the type of link tracing. Default is DDTrace. |
sessionReplaySampleRate |
float |
❌ | Sets the session replay sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. |
sessionReplayOnErrorSampleRate |
float |
❌ | Sets the error collection rate. When a session is not sampled by sessionReplaySampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. |
iOS/tvOS¶
Parameter Name |
Data Type | Hot Reloadable | Description |
|---|---|---|---|
env |
string |
❌ | Environment configuration, default prod. Any character, recommended to use a single word, e.g., test. |
serviceName |
string |
❌ | Sets the name of the associated business or service, affecting the service field data in Log and RUM. Default is df_rum_ios. |
autoSync |
bool |
✅ | Whether to automatically sync data to the server after collection. Default is true. |
compressIntakeRequests |
bool |
✅ | Compresses upload sync data using deflate. Disabled by default. |
syncPageSize |
int |
✅ | Sets the number of entries per sync request, range [5,∞). Note: Larger request entry counts mean data synchronization consumes more computing resources. |
syncSleepTime |
int |
✅ | Sets the sync interval time, in milliseconds. Range [0,5000]. Not set by default. |
rumSampleRate |
float |
✅ | Sets the RUM sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. Scope applies to all View, Action, LongTask, Error data under the same session_id. iOS: ft-sdk > 1.5.21 |
rumSessionOnErrorSampleRate |
float |
✅ | Sets the error collection rate. When a session is not sampled by rumSampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. Scope is the same as rumSampleRate. Hot reloadable: iOS: ft-sdk > 1.5.21 |
rumEnableTraceUserAction |
bool |
❌ | Whether to trace user Action operations. Default is false. |
rumEnableTraceUserView |
bool |
❌ | Whether to trace user View operations. Default is false. |
rumEnableTraceUserResource |
bool |
❌ | Whether to trace user network requests. Default is false. |
rumEnableResourceHostIP |
bool |
❌ | Whether to collect the IP address of the requested target domain. Supported on >= iOS 13.0, >= tvOS 13.0. |
rumEnableTrackAppUIBlock |
bool |
❌ | Whether to enable UI freeze detection. Default is false. |
rumBlockDurationMs |
int |
❌ | Sets the UI freeze detection threshold, value range [100,∞), unit milliseconds, default 250ms. |
rumEnableTrackAppCrash |
bool |
❌ | Whether to collect crash logs. Default is false. |
rumEnableTrackAppANR |
bool |
❌ | Whether to enable ANR detection. Default is false. |
rumEnableTraceWebView |
bool |
❌ | Whether to enable webview data monitoring. Default is true. |
rumAllowWebViewHost |
string json array |
❌ | Configures allowed webview host addresses for data tracing. No filtering by default. Example: ["10.0.0.1"]. |
logSampleRate |
float |
✅ | Sets the Log sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. iOS: ft-sdk > 1.5.19 |
logLevelFilters |
string json array |
✅ | Sets log level filtering. Not set by default. Example: ["info","warn"]. |
logEnableCustomLog |
bool |
✅ | Whether to upload custom logs. Default is false. |
traceSampleRate |
float |
✅ | Sets the trace sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. iOS: ft-sdk > 1.5.19 |
traceEnableAutoTrace |
bool |
❌ | Sets whether to enable automatic http trace. Currently only supports NSURLSession. Default is false. |
traceType |
string |
❌ | Sets the type of link tracing. Default is DDTrace. |
sessionReplaySampleRate |
float |
❌ | Sets the session replay sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. |
sessionReplayOnErrorSampleRate |
float |
❌ | Sets the error collection rate. When a session is not sampled by sessionReplaySampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. |
React Native¶
Parameter Name |
Data Type | Hot Reloadable | Description |
|---|---|---|---|
env |
string |
❌ | Environment configuration, default prod. Any character, recommended to use a single word, e.g., test. |
serviceName |
string |
❌ | Sets the name of the associated business or service, affecting the service field data in Log and RUM. Default: df_rum_ios, df_rum_android. |
autoSync |
bool |
✅ | Whether to automatically sync data to the server after collection. Default is true. |
compressIntakeRequests |
bool |
✅ | Compresses upload sync data using deflate. Disabled by default. |
syncPageSize |
int |
✅ | Sets the number of entries per sync request, range [5,∞). Note: Larger request entry counts mean data synchronization consumes more computing resources. |
syncSleepTime |
int |
✅ | Sets the sync interval time, in milliseconds. Range [0,5000]. Not set by default. |
rumSampleRate |
float |
✅ | Sets the RUM sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. Scope applies to all View, Action, LongTask, Error data under the same session_id. |
rumSessionOnErrorSampleRate |
float |
✅ | Sets the error collection rate. When a session is not sampled by rumSampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. Scope is the same as rumSampleRate. |
rumEnableTraceUserAction |
bool |
❌ | Whether to perform Native Action tracing. Default is false. |
rumEnableTraceUserView |
bool |
❌ | Whether to perform Native View automatic tracing. Default is false. |
rumEnableTraceUserResource |
bool |
❌ | Whether to enable Native Resource automatic tracing. Default is false. |
rumEnableResourceHostIP |
bool |
❌ | Whether to collect the IP address of the requested target domain. Scope: Only affects default collection when enableNativeUserResource is true. iOS: Supported on >= iOS 13; Android: The same OkhttpClient has an IP caching mechanism. |
rumEnableTrackAppUIBlock |
bool |
❌ | Whether to collect Native Freeze. Default is false. |
rumBlockDurationMs |
int |
❌ | Sets the Native Freeze freeze threshold, value range [100,∞), unit milliseconds. iOS default 250ms, Android default 1000ms. |
rumEnableTrackAppCrash |
bool |
❌ | Whether to enable Android Java Crash and OC/C/C++ crash monitoring. Default is false. |
rumEnableTrackAppANR |
bool |
❌ | Whether to enable Native ANR monitoring. Default is false. |
rumEnableTraceWebView |
bool |
❌ | Whether to enable webview data monitoring. Default is true. |
rumAllowWebViewHost |
string json array |
❌ | Configures allowed webview host addresses for data tracing. No filtering by default. Example: ["10.0.0.1"]. |
logSampleRate |
float |
✅ | Sets the Log sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. |
logLevelFilters |
string json array |
✅ | Sets log level filtering. Not set by default. Example: ["info","warn"]. |
logEnableCustomLog |
bool |
✅ | Whether to upload custom logs. Default is false. |
traceSampleRate |
float |
✅ | Sets the trace sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. |
traceEnableAutoTrace |
bool |
❌ | Sets whether to enable native network automatic tracing for iOS NSURLSession and Android OKhttp. Default is false. |
traceType |
string |
❌ | Sets the type of link tracing. Defaults are ddTrace, zipkinMultiHeader, zipkinSingleHeader, traceparent, skywalking, jaeger. |
sessionReplaySampleRate |
float |
❌ | Sets the session replay sampling rate, value range [0,1]. 0 means no collection, 1 means full collection, default is 1. |
sessionReplayOnErrorSampleRate |
float |
❌ | Sets the error collection rate. When a session is not sampled by sessionReplaySampleRate, if an error occurs during the session, data from the 1 minute before the error can be collected. Value range [0,1]. 0 means no collection, 1 means full collection, default is 0. |
Mobile (Android, iOS/tvOS, React Native) remote configuration effectiveness rules:
-
Hot Reloadable: Can take effect immediately after the mobile SDK syncs the remote configuration without re-initializing the SDK, mainly for rate-limiting scenarios.
-
Delete Configuration: Requires the next launch to take effect.
-
Parameter Format Configuration Error: If parameters are not set according to the corresponding data type, or parsing errors occur, they will be considered invalid configurations and have no effect.