sentry

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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