Skip to content

Support query argument redaction in DM logging #11489

@michaelmdeng

Description

@michaelmdeng

Is your feature request related to a problem?

When DM logs queries, either with debug logging for all queries, or when encountering errors with warning/error logging, it logs the entire text of the query with arguments. This risks logging sensitive data.

For example, many of the log lines in https://github.com/pingcap/tiflow/blob/master/dm/pkg/conn/baseconn.go will log (truncated) full queries and arguments

Describe the feature you'd like

Configuration, similar to tidb log redaction, that will redact sensitive arguments from queries when DM logs them.

Describe alternatives you've considered

Since they are logged at all possible log levels, no alternative but turning off logging entirely.

Teachability, Documentation, Adoption, Migration Strategy

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureIssues about a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions