exception

package
v0.6.111 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 4 Imported by: 0

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