Documentation ¶
Index ¶
- func AddBreadcrumb(ctx context.Context, breadcrumb *sentrygo.Breadcrumb)
- func AddContext(ctx context.Context, key string, value interface{})
- func AddTag(ctx context.Context, key, value string)
- func RecordError(ctx context.Context, err error)
- func SetIPAddress(ctx context.Context, value string)
- type Sentry
- type StubSentry
- func (s *StubSentry) GetBreadcrumbs() []*sentrygo.Breadcrumb
- func (s *StubSentry) GetContext() map[string]interface{}
- func (s *StubSentry) GetLastError() error
- func (s *StubSentry) GetTags() map[string]string
- func (s *StubSentry) Shutdown(ctx context.Context)
- func (s *StubSentry) WrapContext(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBreadcrumb ¶
func AddBreadcrumb(ctx context.Context, breadcrumb *sentrygo.Breadcrumb)
AddBreadcrumb adds breadcrumb (trail of operations). https://docs.sentry.io/platforms/go/enriching-events/breadcrumbs/
func AddContext ¶
AddContext add "context" (sentry term, un-searchable attribute) value. https://docs.sentry.io/platforms/go/enriching-events/context/
func AddTag ¶
AddTag adds tag (searchable value). https://docs.sentry.io/platforms/go/enriching-events/tags/
func RecordError ¶
RecordError send error event to sentry
func SetIPAddress ¶
SetIPAddress set IP address information of the client
Types ¶
type Sentry ¶
type Sentry interface { // WrapContext makes dedicated Sentry context object("hub") for the context. // Should create separate "Hub" instances for each requests / background tasks. // https://docs.sentry.io/platforms/go/concurrency/ WrapContext(ctx context.Context) context.Context Shutdown(ctx context.Context) }
Sentry integration interface.
type StubSentry ¶
type StubSentry struct {
// contains filtered or unexported fields
}
StubSentry is stub (testing)
func (*StubSentry) GetBreadcrumbs ¶
func (s *StubSentry) GetBreadcrumbs() []*sentrygo.Breadcrumb
GetBreadcrumbs returns list of captured data
func (*StubSentry) GetContext ¶
func (s *StubSentry) GetContext() map[string]interface{}
GetContext returns map of contexts
func (*StubSentry) GetLastError ¶
func (s *StubSentry) GetLastError() error
GetLastError returns last captured error
func (*StubSentry) GetTags ¶
func (s *StubSentry) GetTags() map[string]string
GetTags returns map of tags
func (*StubSentry) Shutdown ¶
func (s *StubSentry) Shutdown(ctx context.Context)
Shutdown stub implementation
func (*StubSentry) WrapContext ¶
func (s *StubSentry) WrapContext(ctx context.Context) context.Context
WrapContext wraps context to activate Sentry.