Versions in this module Expand all Collapse all v1 v1.0.1 Aug 30, 2021 Changes in this version type Event + Title string v1.0.0 Nov 20, 2020 Changes in this version + const HubContextKey + const RequestContextKey + const Version + var Logger = log.New(ioutil.Discard, "[Sentry] ", log.LstdFlags) + func AddBreadcrumb(breadcrumb *Breadcrumb) + func AddGlobalEventProcessor(processor EventProcessor) + func ConfigureScope(f func(scope *Scope)) + func Flush(timeout time.Duration) bool + func HasHubOnContext(ctx context.Context) bool + func Init(options ClientOptions) error + func PopScope() + func PushScope() + func SetHubOnContext(ctx context.Context, hub *Hub) context.Context + func WithScope(f func(scope *Scope)) + type Breadcrumb struct + Category string + Data map[string]interface{} + Level Level + Message string + Timestamp time.Time + Type string + func (b *Breadcrumb) MarshalJSON() ([]byte, error) + type BreadcrumbHint map[string]interface + type Client struct + Transport Transport + func NewClient(options ClientOptions) (*Client, error) + func (client *Client) AddEventProcessor(processor EventProcessor) + func (client *Client) CaptureEvent(event *Event, hint *EventHint, scope EventModifier) *EventID + func (client *Client) CaptureException(exception error, hint *EventHint, scope EventModifier) *EventID + func (client *Client) CaptureMessage(message string, hint *EventHint, scope EventModifier) *EventID + func (client *Client) Flush(timeout time.Duration) bool + func (client *Client) Recover(err interface{}, hint *EventHint, scope EventModifier) *EventID + func (client *Client) RecoverWithContext(ctx context.Context, err interface{}, hint *EventHint, scope EventModifier) *EventID + func (client Client) Options() ClientOptions + type ClientOptions struct + AttachStacktrace bool + BeforeBreadcrumb func(breadcrumb *Breadcrumb, hint *BreadcrumbHint) *Breadcrumb + BeforeSend func(event *Event, hint *EventHint) *Event + CaCerts *x509.CertPool + Debug bool + DebugWriter io.Writer + Dist string + Dsn string + Environment string + HTTPClient *http.Client + HTTPProxy string + HTTPSProxy string + HTTPTransport http.RoundTripper + IgnoreErrors []string + Integrations func([]Integration) []Integration + MaxBreadcrumbs int + Release string + SampleRate float64 + ServerName string + Transport Transport + type Dsn struct + func NewDsn(rawURL string) (*Dsn, error) + func (dsn *Dsn) UnmarshalJSON(data []byte) error + func (dsn Dsn) EnvelopeAPIURL() *url.URL + func (dsn Dsn) MarshalJSON() ([]byte, error) + func (dsn Dsn) RequestHeaders() map[string]string + func (dsn Dsn) StoreAPIURL() *url.URL + func (dsn Dsn) String() string + type DsnParseError struct + Message string + func (e DsnParseError) Error() string + type Event struct + Breadcrumbs []*Breadcrumb + Contexts map[string]interface{} + Dist string + Environment string + EventID EventID + Exception []Exception + Extra map[string]interface{} + Fingerprint []string + Level Level + Logger string + Message string + Modules map[string]string + Platform string + Release string + Request *Request + Sdk SdkInfo + ServerName string + Spans []*Span + StartTimestamp time.Time + Tags map[string]string + Threads []Thread + Timestamp time.Time + Transaction string + Type string + User User + func NewEvent() *Event + func (e *Event) MarshalJSON() ([]byte, error) + type EventHint struct + Context context.Context + Data interface{} + EventID string + OriginalException error + RecoveredException interface{} + Request *http.Request + Response *http.Response + type EventID string + func CaptureEvent(event *Event) *EventID + func CaptureException(exception error) *EventID + func CaptureMessage(message string) *EventID + func LastEventID() EventID + func Recover() *EventID + func RecoverWithContext(ctx context.Context) *EventID + type EventModifier interface + ApplyToEvent func(event *Event, hint *EventHint) *Event + type EventProcessor func(event *Event, hint *EventHint) *Event + type Exception struct + Module string + Stacktrace *Stacktrace + ThreadID string + Type string + Value string + type Frame struct + AbsPath string + Colno int + ContextLine string + Filename string + Function string + InApp bool + Lineno int + Module string + Package string + PostContext []string + PreContext []string + Symbol string + Vars map[string]interface{} + func NewFrame(f runtime.Frame) Frame + type HTTPSyncTransport struct + Timeout time.Duration + func NewHTTPSyncTransport() *HTTPSyncTransport + func (t *HTTPSyncTransport) Configure(options ClientOptions) + func (t *HTTPSyncTransport) Flush(_ time.Duration) bool + func (t *HTTPSyncTransport) SendEvent(event *Event) + type HTTPTransport struct + BufferSize int + Timeout time.Duration + func NewHTTPTransport() *HTTPTransport + func (t *HTTPTransport) Configure(options ClientOptions) + func (t *HTTPTransport) Flush(timeout time.Duration) bool + func (t *HTTPTransport) SendEvent(event *Event) + type Hub struct + func CurrentHub() *Hub + func GetHubFromContext(ctx context.Context) *Hub + func NewHub(client *Client, scope *Scope) *Hub + func (hub *Hub) AddBreadcrumb(breadcrumb *Breadcrumb, hint *BreadcrumbHint) + func (hub *Hub) BindClient(client *Client) + func (hub *Hub) CaptureEvent(event *Event) *EventID + func (hub *Hub) CaptureException(exception error) *EventID + func (hub *Hub) CaptureMessage(message string) *EventID + func (hub *Hub) Client() *Client + func (hub *Hub) Clone() *Hub + func (hub *Hub) ConfigureScope(f func(scope *Scope)) + func (hub *Hub) Flush(timeout time.Duration) bool + func (hub *Hub) LastEventID() EventID + func (hub *Hub) PopScope() + func (hub *Hub) PushScope() *Scope + func (hub *Hub) Recover(err interface{}) *EventID + func (hub *Hub) RecoverWithContext(ctx context.Context, err interface{}) *EventID + func (hub *Hub) Scope() *Scope + func (hub *Hub) WithScope(f func(scope *Scope)) + type Integration interface + Name func() string + SetupOnce func(client *Client) + type Level string + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelWarning + type Request struct + Cookies string + Data string + Env map[string]string + Headers map[string]string + Method string + QueryString string + URL string + func NewRequest(r *http.Request) *Request + type Scope struct + func NewScope() *Scope + func (scope *Scope) AddBreadcrumb(breadcrumb *Breadcrumb, limit int) + func (scope *Scope) AddEventProcessor(processor EventProcessor) + func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event + func (scope *Scope) Clear() + func (scope *Scope) ClearBreadcrumbs() + func (scope *Scope) Clone() *Scope + func (scope *Scope) RemoveContext(key string) + func (scope *Scope) RemoveExtra(key string) + func (scope *Scope) RemoveTag(key string) + func (scope *Scope) SetContext(key string, value interface{}) + func (scope *Scope) SetContexts(contexts map[string]interface{}) + func (scope *Scope) SetExtra(key string, value interface{}) + func (scope *Scope) SetExtras(extra map[string]interface{}) + func (scope *Scope) SetFingerprint(fingerprint []string) + func (scope *Scope) SetLevel(level Level) + func (scope *Scope) SetRequest(r *http.Request) + func (scope *Scope) SetRequestBody(b []byte) + func (scope *Scope) SetTag(key, value string) + func (scope *Scope) SetTags(tags map[string]string) + func (scope *Scope) SetTransaction(transactionName string) + func (scope *Scope) SetUser(user User) + type SdkInfo struct + Integrations []string + Name string + Packages []SdkPackage + Version string + type SdkPackage struct + Name string + Version string + type Span struct + Data map[string]interface{} + Description string + EndTimestamp time.Time + Op string + ParentSpanID string + SpanID string + StartTimestamp time.Time + Status string + Tags map[string]string + TraceID string + type Stacktrace struct + Frames []Frame + FramesOmitted []uint + func ExtractStacktrace(err error) *Stacktrace + func NewStacktrace() *Stacktrace + type Thread struct + Crashed bool + Current bool + ID string + Name string + Stacktrace *Stacktrace + type TraceContext struct + Description string + Op string + SpanID string + Status string + TraceID string + type Transport interface + Configure func(options ClientOptions) + Flush func(timeout time.Duration) bool + SendEvent func(event *Event) + type User struct + Email string + ID string + IPAddress string + Username string