sentry

package
v0.0.0-...-79153e9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReceiver

func NewReceiver(dsn string, cfg *Config) (slf.Receiver, error)

NewReceiver allows you to create a new receiver in the Sentry using the fastest and easiest way. The Config parameter can be passed as nil if you do not need additional filtration.

func NewReceiverWithCustomRaven

func NewReceiverWithCustomRaven(client *raven.Client, cfg *Config) (slf.Receiver, error)

NewReceiverWithCustomRaven allows you to create a new receiver in the Sentry configuring raven.Client by yourself. This can be useful if you need to set additional parameters, such as release and environment, that will be sent with each Packet in the Sentry:

client, err := raven.New("https://some:sentry@dsn.sentry.io/1")

if err != nil {
    return nil, err
}

client.SetRelease("1.3.2") client.SetEnvironment("production") client.SetDefaultLoggerName("sentry-watchdog-receiver")

sentryReceiver, err := sentry.NewReceiverWithCustomRaven(client, &sentry.Config{
    MinLevel: "warn",
})

The Config parameter allows you to add additional filtering, such as the minimum message level and the exclusion of private parameters. If you do not need additional filtering, nil can passed.

Types

type Config

type Config struct {
	MinLevel        string
	ParamsWhiteList []string
	ParamsBlackList []string
}

Config holds information for filtered receiver

Jump to

Keyboard shortcuts

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