exception

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 4 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 exception writes errors and panics as OpenTelemetry exception log records: exception.type, exception.message, exception.stacktrace and event.name=exception. The console's Errors section reads such records from the log store with no further setup.

Index

Constants

View Source
const (
	Type       = "exception.type"
	Message    = "exception.message"
	Stacktrace = "exception.stacktrace"
	EventName  = "event.name"
)

Keys of the OpenTelemetry exception conventions.

Variables

This section is empty.

Functions

func Fields

func Fields(err error) []xlog.Field

Fields describe err: its type is the deepest cause of a telling type (a sentinel's *errors.errorString and fmt's wrappers say nothing; none left: "error"), its stack the caller's (Go errors carry none).

func Panic

func Panic(v any, stack []byte) []xlog.Field

Panic describes a recovered panic value with the stack it unwound.

Types

This section is empty.

Jump to

Keyboard shortcuts

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