obs

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 2 Imported by: 0 modules, 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 obs wires optional Sentry error reporting. It is disabled unless SENTRY_DSN is set; when enabled it captures panics and any error passed to Capture, so operators can see when something breaks. The DSN is never hardcoded — vellum is open source, so each deployment sets its own in the environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(err error, tags map[string]string)

Capture sends an error to Sentry with optional tags. No-op when disabled.

func CaptureMessage

func CaptureMessage(msg string)

CaptureMessage sends a message-level event. No-op when disabled.

func Enabled

func Enabled() bool

Enabled reports whether Sentry is active.

func Init

func Init(cfg Config) (func(), error)

Init initializes Sentry when a DSN is present and returns a flush function to defer. With no DSN it is a no-op (returns a no-op flush).

Types

type Config

type Config struct {
	DSN         string
	Environment string
	Release     string
}

Config is the Sentry configuration read from the environment.

Jump to

Keyboard shortcuts

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