zapsentry

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSentryFlushTimeout = 5 * time.Second

DefaultSentryFlushTimeout is sentry flush timeout used in sentry.Flush() when calling Core.Sync()

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	zapcore.LevelEnabler
	// contains filtered or unexported fields
}

Core struct

func NewCore

func NewCore(enab zapcore.LevelEnabler, client *sentry.Client, options ...Option) *Core

NewCore creates a zapcore.Core.

func (*Core) Check

func (c *Core) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry

Check verifies whether or not the provided entry should be logged, by comparing the log level with the configured log level in the core. If it should be logged the core is added to the returned entry.

func (*Core) Sync

func (c *Core) Sync() error

Sync flushes buffered logs (if any).

func (*Core) With

func (c *Core) With(fields []zapcore.Field) zapcore.Core

With adds structured context to the Core.

func (*Core) Write

func (c *Core) Write(entry zapcore.Entry, fields []zapcore.Field) error

nolint Write converts entry to Sentry event and send it

type Option

type Option func(*Core)

Option type

func SetFlushTimeout

func SetFlushTimeout(timeout time.Duration) Option

SetFlushTimeout set sentry flush timeout

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL