Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/util/debugutil: introduce debug.Stack() wrapper #136288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 27, 2024

  1. pkg/util/debugutil: introduce debug.Stack() wrapper

    Until now, all stack traces were treated as untyped strings and hence
    redacted. Stack traces don't need to be redacted. Because they don't
    contain any PII. This commit fixes that with the following changes:
    
      * Introduce a new function 'Stack()' in the debugutil package as a
        replacement for the standard 'debug.Stack()'. This new function
        wraps the stack trace contents in redact.Safe() to make sure that it
        does not get redacted.
    
      * Replace the all the current uses of debug.Stack() across the
        codebase with debugutil.Stack()
    
      * Add a linter rule to block future uses of debug.Stack(). The linter
        error will nudge users to use debugutil.Stack() instead.
    
    Part of: CRDB-15292
    Epic: CRDB-37533
    Release note: None
    arjunmahishi committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    5392804 View commit details
    Browse the repository at this point in the history