bugsnag

package
v0.0.0-...-8675af2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notify

func Notify(config *Config, jobName string, eventName string, err error, trace *stack.Trace, kvs map[string]string) error

Notify will send the error and stack trace to Bugsnag. Note that this doesn't take advantage of all of Bugsnag's capabilities.

Types

type Config

type Config struct {
	// Your Bugsnag API key, e.g. "c9d60ae4c7e70c4b6c4ebd3e8056d2b8". You can
	// find this by clicking Settings on https://bugsnag.com/.
	APIKey string

	// The Endpoint to notify about crashes. This defaults to
	// "https://notify.bugsnag.com/", if you're using Bugsnag Enterprise then
	// set it to your internal Bugsnag endpoint.
	Endpoint string

	// The current release stage. This defaults to "production" and is used to
	// filter errors in the Bugsnag dashboard.
	ReleaseStage string

	// The currently running version of the app. This is used to filter errors
	// in the Bugsnag dasboard. If you set this then Bugsnag will only re-open
	// resolved errors if they happen in different app versions.
	AppVersion string

	// The hostname of the current server. This defaults to the return value of
	// os.Hostname() and is graphed in the Bugsnag dashboard.
	Hostname string
}

type Sink

type Sink struct {
	*Config
	// contains filtered or unexported fields
}

This sink emits to a StatsD deaemon by sending it a UDP packet.

func NewSink

func NewSink(config *Config) *Sink

func (*Sink) EmitComplete

func (s *Sink) EmitComplete(job string, status health.CompletionStatus, nanos int64, kvs map[string]string)

func (*Sink) EmitEvent

func (s *Sink) EmitEvent(job string, event string, kvs map[string]string)

func (*Sink) EmitEventErr

func (s *Sink) EmitEventErr(job string, event string, inputErr error, kvs map[string]string)

func (*Sink) EmitGauge

func (s *Sink) EmitGauge(job string, event string, value float64, kvs map[string]string)

func (*Sink) EmitTiming

func (s *Sink) EmitTiming(job string, event string, nanos int64, kvs map[string]string)

func (*Sink) ShutdownServer

func (s *Sink) ShutdownServer()

Jump to

Keyboard shortcuts

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