Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { DSN string MinLevel *string `yaml:"min_level"` Fields map[string]interface{} Trace *struct { Disabled bool SkipFrames *int `yaml:"skip_frames"` ContextLines *int `yaml:"context_lines"` } }
Configuration provides sentry DSN and other optional parameters for logging
type Hook ¶
type Hook struct { Capturer // contains filtered or unexported fields }
Hook wraps the default raven-go client for some out-of-box awesomeness and tight integration with ulog
func Configure ¶
func Configure(c Configuration) (*Hook, error)
Configure returns a new Sentry Hook based on SentryConfiguration.
func (*Hook) AppendFields ¶
func (sh *Hook) AppendFields(keyvals ...interface{})
AppendFields expands the currently stored context of the hook
func (*Hook) CheckAndFire ¶
CheckAndFire check to see if logging level is above Sentry threshold and if so, fires off a Sentry packet
type MemCapturer ¶
MemCapturer foo
func (*MemCapturer) Capture ¶
func (m *MemCapturer) Capture(p *raven.Packet)
Capture remembers the would-be-sent packet in the packets array
type Option ¶
type Option func(sh *Hook)
Option pattern for Hook creation.
func DisableTraces ¶
func DisableTraces() Option
DisableTraces allows to turn off Stacktrace for sentry packets.
func MinLevel ¶
MinLevel provides a minimum level threshold. All log messages above the set level are sent to Sentry.
func TraceAppPrefixes ¶
TraceAppPrefixes sets a list of go import prefixes that are considered "in app".
func TraceContextLines ¶
TraceContextLines sets how many lines of code (in on direction) are sent with the Sentry packet.
func TraceSkipFrames ¶
TraceSkipFrames sets how many stacktrace frames to skip when sending a sentry packet. This is very useful when helper functions are involved.