sentrytest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExceptionText

func ExceptionText(event *sentry.Event) string

ExceptionText joins the exception messages for assertions on an error chain.

func ExceptionValues

func ExceptionValues(event *sentry.Event) []string

ExceptionValues returns every exception message in the event.

Types

type Capture

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

Capture records events from a test Sentry client without external delivery.

func BindHub

func BindHub(t *testing.T) *Capture

BindHub captures the current hub's events and restores its client after the test.

func (*Capture) Configure

func (*Capture) Configure(sentry.ClientOptions)

func (*Capture) Events

func (c *Capture) Events() []*sentry.Event

Events returns the events that the client sent to this capture.

func (*Capture) Flush

func (*Capture) Flush(time.Duration) bool

func (*Capture) SendEvent

func (c *Capture) SendEvent(event *sentry.Event)

Jump to

Keyboard shortcuts

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