Skip to content

Do not set non masked log message if a logging encoder is set #2973

Description

@adinauer

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions