PII Redaction Methods

remove
Remove the entire field. Relay may choose to either set it to null or to remove it entirely.

Copied
{
  "rules": {
    "remove_ip": {
      "type": "ip",
      "redaction": {
        "method": "remove"
      }
    }
  },
  "applications": {
    "$string": ["remove_ip"]
  }
}

replace
Replace the key with a static string.

Copied
{
  "rules": {
    "replace_ip": {
      "type": "ip",
      "redaction": {
        "method": "replace",
        "text": [censored]"
      }
    }
  },
  "applications": {
    "$string": ["replace_ip"]
  }
}

mask

: Replace every character of the matched string with a "masking" char *. Compared to replace this preserves the length of the original string.

Copied
{
  "rules": {
    "mask_ip": {
      "type": "ip",
      "redaction": {
        "method": "mask"
      }
    }
  },
  "applications": {
    "$string": ["mask_ip"]
  }
}

hash

: Replace the string with a hashed version of itself. Equal strings will produce the same hash, so if you, for example, decide to hash the user ID instead of replacing or removing it, you will still have an accurate count of users affected.

Copied
{
  "rules": {
    "hash_ip": {
      "type": "ip",
      "redaction": {
        "method": "hash"
      }
    }
  }
  "applications": {
    "$string": ["mask_ip"]
  }
}
You can edit this page on GitHub.