sentry

package
v0.0.0-...-4b7956f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InitFunc    = sentry.Init
	FlushFunc   = sentry.Flush
	RecoverFunc = sentry.Recover
)

We need these variables to be able to mock sentry.CaptureMessage and sentry.CaptureException in tests since package level functions cannot be mocked

Functions

This section is empty.

Types

type MockSentry

type MockSentry struct {
	mock.Mock
}

MockSentry is a mock struct to capture function calls

func NewMockSentry

func NewMockSentry(t *testing.T) *MockSentry

func (*MockSentry) CaptureException

func (m *MockSentry) CaptureException(exception error) *sentry.EventID

func (*MockSentry) CaptureMessage

func (m *MockSentry) CaptureMessage(message string) *sentry.EventID

func (*MockSentry) Flush

func (m *MockSentry) Flush(timeout time.Duration) bool

func (*MockSentry) Init

func (m *MockSentry) Init(options sentry.ClientOptions) error

func (*MockSentry) Recover

func (m *MockSentry) Recover() *sentry.EventID

type SentryTracker

type SentryTracker struct{}

func NewSentryTracker

func NewSentryTracker(dsn string, env string, flushFreq int) (*SentryTracker, error)

func (*SentryTracker) CaptureException

func (s *SentryTracker) CaptureException(exception error)

func (*SentryTracker) CaptureMessage

func (s *SentryTracker) CaptureMessage(message string)

Jump to

Keyboard shortcuts

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