sentry

package
v0.0.0-...-f39a356 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-2.0, GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Accepted severity levels by Sentry
	DEBUG   Severity = "debug"
	INFO             = "info"
	WARNING          = "warning"
	ERROR            = "error"
	FATAL            = "fatal"
)

Variables

This section is empty.

Functions

func SendError

func SendError(client *http.Client, serr *Error) (err error)

Sends error to Sentry

Types

type Error

type Error struct {
	Dsn    string
	Packet *Packet
}

type Packet

type Packet struct {
	EventId    string      `json:"event_id"`  // Unique id, max 32 characters
	Timestamp  time.Time   `json:"timestamp"` // Sentry assumes it is given in UTC. Use the ISO 8601 format
	Message    string      `json:"message"`   // Human-readable message, max length 1000 characters
	Level      Severity    `json:"level"`     // Defaults to "error"
	Logger     string      `json:"logger"`    // Defaults to "root"
	Culprit    string      `json:"culprit"`   // Becomes main name in Sentry
	ServerName string      `json:"server_name"`
	Tags       interface{} `json:"tags,omitempty"` // Additional optional tags
}

type Sentry

type Sentry struct {
	// contains filtered or unexported fields
}

type SentryRateLimitError

type SentryRateLimitError string

func (SentryRateLimitError) Error

func (self SentryRateLimitError) Error() string

type Severity

type Severity string

Jump to

Keyboard shortcuts

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