Documentation
¶
Index ¶
Constants ¶
const OTelCodeStackTrace = "code.stacktrace"
OTelCodeStackTrace a stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. See: https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/attributes-registry/code.md
Variables ¶
This section is empty.
Functions ¶
func PanicLogger ¶
func PanicLogger(options ...func(*panicLoggerOptions))
PanicLogger is a function that logs panics and then propagates the failure based on the propagationStrategy setting Usage (in main):
defer log.PanicLogger(log.WithExit)
func WithContinue ¶
func WithContinue(o *panicLoggerOptions)
WithContinue is an option to set the propagation strategy to continue the program after logging the panic
func WithExit ¶
func WithExit(o *panicLoggerOptions)
WithExit is an option to set the propagation strategy to exit the program after logging the panic
func WithRePanic ¶
func WithRePanic(o *panicLoggerOptions)
WithRePanic is an option to set the propagation strategy to propagate the panic after logging it
Types ¶
type MockHandler ¶
func NewMockHandler ¶
func NewMockHandler() *MockHandler