Skip to content

Environment Variable SDK Configuration Parameter Fields


Use Cases

For configuration instructions, refer to Adding Environment Variables for RUM SDK.

Key Fields

Parameter Name Data Type Description
sessionSampleRate number Data reporting sampling rate; 100 means full collection, 0 means no collection.
service string The name of the Web application service.
env string The current environment of the Web application, such as
prod: production environment;
gray: canary environment;
pre: pre-release environment;
common: daily environment;
local: local environment.
version string The version number of the Web application.
tracingSampleRate number 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-partition implementation. Default does not allow cross-domain.
storeContextsToLocal boolean Whether to store common data in localstorage, default is not stored.
storeContextsKey string Defines the key for storage in localstorage, default is not filled and auto-generated.
sendContentTypeByJson boolean Data sent in application/json format, default is text.
allowFallbackToLocalStorage boolean In case 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 will be collected at this ratio. 100 means full collection of error sessions, 0 means ignoring error sessions.
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 will be collected at this ratio. 100 means full collection; 0 means no collection.
trackUserInteractions boolean Whether to enable user behavior collection.
compressIntakeRequests boolean Compress RUM data request content to reduce bandwidth usage when sending large amounts of data. Compression is completed in the Worker thread.
traceType TraceType Configures the type of tracing tool, default is ddtrace. Currently supports 6 data types: ddtrace, zipkin, skywalking_v3, jaeger, zipkin_single_header, w3c_traceparent.

Feedback

Is this page helpful? ×