Skip to content

Conversation

@RSam25
Copy link

@RSam25 RSam25 commented Jan 8, 2026

Benchmarks with different frequency of maskable logs. Real world logs probably have lower than 10% maskable log lines and so would yield an improvement of between 87-98%.
optimized log mask
JFR Profiling results on validator show CPU Use share down from 18% to 0.002%

return mask(super.doLayout(event));
}

private String mask(String message) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method was meant to be generic but right now it's quite specific to S3 presigned URL redaction, I suggest keeping it generic by at least renaming the constants to be specific to AWS S3 presigned URL masking

Something along the lines of:

  • maskPattern -> AWS_PRESIGNED_URL_REGEX_PATTERN
  • maskBroadCheckSubstring -> AWS_SECURITY_TOKEN_HEADER
  • maskedRedaction -> AWS_PRESIGNED_URL_REDACTION_MASK

This makes it obvious that the method is generic and new logic/constants can be added as needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants