Documentation ¶
Index ¶
- Variables
- func NewCore(cfg Configuration, client *sentry.Client) *core
- func Set(l *zap.Logger, opts ...Option) (*zap.Logger, error)
- func SetWith(l *zap.Logger, cfg Configuration, c *sentry.Client) (*zap.Logger, error)
- type Configuration
- type Option
- func DisableStacktrace() Option
- func EnableStacktrace() Option
- func Enviroment(env string) Option
- func FlushTimeout(d time.Duration) Option
- func IgnoreErrors(ignoreErrors []string) Option
- func LevelEnabler(level zapcore.Level) Option
- func Release(release string) Option
- func SentryHub(hub *sentry.Hub) Option
- func SentryTag(key, val string) Option
- func SentryTags(tags map[string]string) Option
- func ServerName(name string) Option
- func TraceSkipFrames(i int) Option
- func WithSentry(dsn string, tags map[string]string) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = []Option{ LevelEnabler(zap.ErrorLevel), TraceSkipFrames(3), EnableStacktrace(), }
DefaultOptions commonly used options.
Functions ¶
func NewCore ¶
func NewCore(cfg Configuration, client *sentry.Client) *core
NewCore returns implementation of zapcore.Core.
Types ¶
type Configuration ¶
type Configuration struct { ClientOptions sentry.ClientOptions Tags map[string]string TraceSkipFrames int Stacktrace bool LevelEnabler zapcore.Level FlushTimeout time.Duration Hub *sentry.Hub }
Configuration is a minimal set of parameters for Sentry integration.
type Option ¶
type Option func(*Configuration)
func DisableStacktrace ¶
func DisableStacktrace() Option
func EnableStacktrace ¶
func EnableStacktrace() Option
func FlushTimeout ¶
func IgnoreErrors ¶
func LevelEnabler ¶
func ServerName ¶ added in v2.1.0
func TraceSkipFrames ¶
Click to show internal directories.
Click to hide internal directories.