Skip to content

feat(ml-api): redact secrets/PII from logs and route errors through it - #1016

Open
pavsoss wants to merge 2 commits into
Userunknown84:mainfrom
pavsoss:feat/1006-logging-redaction
Open

feat(ml-api): redact secrets/PII from logs and route errors through it#1016
pavsoss wants to merge 2 commits into
Userunknown84:mainfrom
pavsoss:feat/1006-logging-redaction

Conversation

@pavsoss

@pavsoss pavsoss commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Builds on the JSON logging layer to make it safe and complete.

  • A redaction filter scrubs the internal secret, OAuth tokens, API keys, and email addresses / message bodies from every record.
  • The error handlers and the zero-trust warnings now log through the structured logger, including the ErrorCode and request id.

Test plan

Regression coverage asserts each record is valid JSON, the request id propagates from the header, and known secrets/tokens/emails never appear in the output.

Dependency

Builds on #1006 part 1/2 (feat/1006-logging-infra); merge after it. Until then this PR's diff includes part 1's commit.

Part 2/2, Closes #1006.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@pavsoss is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Userunknown84 Userunknown84 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge Conflict Shown kindly fix this.

@pavsoss
pavsoss requested a review from Userunknown84 July 29, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Structured JSON logging with request-ID correlation and secret/PII redaction for the Flask ML API

2 participants