sentry

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sentry implements logic for using Sentry for error reporting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureError

func CaptureError(ctx context.Context, err error)

CaptureError captures the current error and sends it to Sentry using the hub from the current context. This should only be used for actionable errors to avoid flooding Sentry with useless reports. If Sentry is not enabled or the context has no associated hub, this function will have no effect.

func Initialize

func Initialize(dsn, environment, release string) error

Initialize initializes a Sentry connection with the given client option values.

func SetHubOnContext

func SetHubOnContext(ctx context.Context) context.Context

SetHubOnContext clones the current hub and sets it on the given context.

func SetTag

func SetTag(ctx context.Context, key, value string)

SetTag sets a tag for the hub associated with the given context. If Sentry is not enabled or the context has no associated hub, this function will have no effect.

Types

This section is empty.

Jump to

Keyboard shortcuts

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