Documentation
¶
Index ¶
- type Writer
- type WriterOption
- func WithDebug() WriterOption
- func WithEnvironment(environment string) WriterOption
- func WithIgnoreErrors(reList []string) WriterOption
- func WithLevels(levels ...zerolog.Level) WriterOption
- func WithRelease(release string) WriterOption
- func WithSampleRate(rate float64) WriterOption
- func WithServerName(serverName string) WriterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a sentry events writer with std io.Writer iface.
func New ¶
func New(dsn string, opts ...WriterOption) (*Writer, error)
New creates writer with provided DSN and options.
type WriterOption ¶
type WriterOption interface {
// contains filtered or unexported methods
}
WriterOption configures sentry events writer.
func WithEnvironment ¶
func WithEnvironment(environment string) WriterOption
WithEnvironment configures the environment to be sent with events.
func WithIgnoreErrors ¶ added in v1.0.0
func WithIgnoreErrors(reList []string) WriterOption
WithIgnoreErrors configures the list of regexp strings that will be used to match against event's message and if applicable, caught errors type and value. If the match is found, then a whole event will be dropped.
func WithLevels ¶
func WithLevels(levels ...zerolog.Level) WriterOption
WithLevels configures zerolog levels that have to be sent to Sentry. Default levels are: error, fatal, panic.
func WithRelease ¶
func WithRelease(release string) WriterOption
WithRelease configures the release to be sent with events.
func WithSampleRate ¶
func WithSampleRate(rate float64) WriterOption
WithSampleRate configures the sample rate as a percentage of events to be sent in the range of 0.0 to 1.0.
func WithServerName ¶
func WithServerName(serverName string) WriterOption
WithServerName configures the server name field for events. Default value is OS hostname.