Documentation ¶
Index ¶
Constants ¶
View Source
const ( FieldError = "error" FieldRequest = "request" FieldEnvironment = "env" FieldBuildInfo = "build" )
Common log fields.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a log/slog.Handler for Sentry.
func NewFromClient ¶
NewFromClient initializes a new Handler which sends logs to the provided sentry client.
func (*Handler) Enabled ¶
Enabled returns true if level is at least to the configured minimum level.
func (*Handler) Flush ¶
Flush waits until the underlying Sentry transport sends any buffered events, blocking for at most the given timeout. It returns false if the timeout was reached, in which case some events may not have been sent.
Click to show internal directories.
Click to hide internal directories.