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

Allow configurable stacktrace encoding #1371

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Oct 9, 2023

  1. Allow configurable stacktrace encoding

    This PR adds a `StacktraceEncoder` type to the `EncoderConfig` struct
    
    Users can override the `EncodeStacktrace` field to configure how stacktraces are outputed
    This PR aims to resolve uber-go#514 by mirroring the behavior of the `EncodeCaller` field
    
    The `EncodeStacktrace` field has been inserted as a required field, and has been added to `NewDevelopmentConfig` and `NewProductionConfig`
    as sane defaults however, it is currently a required field and can cause a panic if a user is manually building their config without these helpers.
    arwineap committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    456073a View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2023

  1. Configuration menu
    Copy the full SHA
    ebc0c4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0dbf50 View commit details
    Browse the repository at this point in the history
  3. removing unneeded nil check

    This is now unneeded because `EncodeStacktrace` will not be nil
    arwineap committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    57f3398 View commit details
    Browse the repository at this point in the history
  4. Fix nil and noop EncodeStacktraces

    improve test cases
    arwineap committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    cad62a8 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. Update zapcore/encoder.go

    Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
    arwineap and abhinav committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    449be6b View commit details
    Browse the repository at this point in the history
  2. Update zapcore/encoder.go

    Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
    arwineap and abhinav committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    d45920a View commit details
    Browse the repository at this point in the history