Data Masking¶
If you wish to perform full-field masking, it is recommended to use dataModifier for better performance. If you need fine-grained replacement for specific data types, it is recommended to use lineDataModifier.
Do not execute complex or high-latency logic within callback methods, as this will significantly impact the SDK's data writing performance.
Single Field Modification (dataModifier)¶
- Purpose: Modifies a single field value within the data.
- Parameter Format:
{ key: newValue } - Example:
{ 'device_uuid': 'xxx' }will replace the value of thedevice_uuidfield in the target data withxxx.
Single Data Line Modification (lineDataModifier)¶
- Purpose: Modifies specified field values within a certain type of data.
- Parameter Format:
{ measurement: { key: newValue } } - Example:
{ 'view': { 'view_url': 'xxx' } }will replace theview_urlfield value for all data of typeviewwithxxx.
Supported data types for measurement:
- RUM data:
view,resource,action,long_task,error - Log data:
log