Problem Statement
Came up in #2246 (comment)
A masking layout is used to filter out PII from log messages. The Sentry SDK sets both the masked and original message on the event being sent to Sentry thus sending PII without any guarding flag.
Solution Brainstorm
We could check if an encoder has been set and treat the original message as PII which we only set on the event if sendDefaultPii is true. We may still have to set something as message (check relay protocol). message is optional (see https://develop.sentry.dev/sdk/event-payloads/message/) This is a breaking change and should be added to 7.0.
Problem Statement
Came up in #2246 (comment)
A masking layout is used to filter out PII from log messages. The Sentry SDK sets both the masked and original message on the event being sent to Sentry thus sending PII without any guarding flag.
Solution Brainstorm
We could check if an encoder has been set and treat the original message as PII which we only set on the event if
sendDefaultPiiistrue.We may still have to set something asmessage(check relay protocol).messageis optional (see https://develop.sentry.dev/sdk/event-payloads/message/) This is a breaking change and should be added to7.0.