Basic Structure
keep values. Transforms only apply to logs
that survive the keep stage.
Transform Order
Transforms execute in a strict order:- Remove - Delete fields
- Redact - Mask field values
- Rename - Change field names
- Add - Insert new fields
Remove
Remove fields from logs. Use this to strip verbose or internal data.Removable Fields
| Field Type | Syntax |
|---|---|
| Log attribute | {"log_attribute": "key"} |
| Resource attribute | {"resource_attribute": "key"} |
| Scope attribute | {"scope_attribute": "key"} |
Example: Remove Verbose Kubernetes Metadata
Redact
Replace field values with a placeholder. The field remains present, but the value is masked.Options
| Option | Default | Description |
|---|---|---|
replacement | "[REDACTED]" | The value to replace with |
Example: Redact PII
Example: Redact Payment Data
Example: Redact When Present
Only redact fields that exist:Rename
Change field names. Use this to normalize attribute names across services.Options
| Option | Default | Description |
|---|---|---|
upsert | false | If true, overwrite the target if it exists. If false, skip the rename if target exists. |
Source Field Types
| Source | Syntax |
|---|---|
| Log attribute | "from_log_attribute": "key" |
| Resource attribute | "from_resource_attribute": "key" |
| Scope attribute | "from_scope_attribute": "key" |
to field is always the new key name within the same attribute category.
Example: Normalize Attribute Names
Example: Rename with Upsert
Add
Insert new fields. Use this to add metadata, tags, or computed values.Options
| Option | Default | Description |
|---|---|---|
upsert | true | If true, overwrite existing values. If false, only add if the field doesn’t exist. |
Field Types
| Type | Syntax |
|---|---|
| Log attribute | "log_attribute": "key" |
| Resource attribute | "resource_attribute": "key" |
| Scope attribute | "scope_attribute": "key" |
Example: Add Processing Metadata
Example: Add Environment Tag
Combined Transforms
You can use multiple transform operations in a single policy:Combining with Keep
Transforms only apply to logs that survive the keep stage:Best Practices
- Redact, don’t remove PII—preserves the signal that data existed
- Use descriptive replacements for redacted fields (
[EMAIL REDACTED]vs[REDACTED]) - Test transforms in staging before production
- Combine related transforms in one policy for clarity
- Document why fields are being modified