sentry

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sentry wraps the sentry client in a simple API.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoClientOrScopeAvailable = errors.New("no client or hub available")
	ErrDidNotFullyFlush         = errors.New("not fully flushed")
)

Errors returned by the Client's methods.

Functions

This section is empty.

Types

type Client

type Client struct{}

Client is a Sentry API Client.

func NewClient

func NewClient(
	dsn, environment, release string,
	traceSampleRate float64,
) (*Client, error)

NewClient returns a new instance of Sentry ReporterService.

func (*Client) Close

func (*Client) Close() error

Close flushes the buffered events..

func (*Client) MonitorOperation

func (*Client) MonitorOperation(
	ctx context.Context,
	operation string,
	traceID [16]byte,
	doFunc func(context.Context),
)

MonitorOperation returns a new context to be used with the operation and a done function to signal that the operation ended.

func (*Client) ReportError

func (*Client) ReportError(ctx context.Context, err error) error

ReportError reports an error to Sentry.

func (*Client) ReportEvent

func (*Client) ReportEvent(ctx context.Context, event string) error

ReportEvent reports an event to Sentry.

Jump to

Keyboard shortcuts

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