diagnostics

package
v0.9.3-dev.6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: GPL-3.0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlreadyReported

func AlreadyReported(err error) bool

AlreadyReported reports whether err carries a diagnostic ownership marker.

func FailureLevel

func FailureLevel(ctx context.Context, err error) (slog.Level, bool)

FailureLevel classifies an operation failure for diagnostic logging.

func MarkReported

func MarkReported(err error) error

MarkReported marks err as already reported by its diagnostic owner.

func Wrap

func Wrap(api protocol.APIError, cause error) error

Wrap combines a public API error with its internal cause.

Types

type Record

type Record struct {
	Component string
	Event     string
	Level     slog.Level
	Err       error
}

Record describes one internal diagnostic event. It must not be serialized.

type Reporter

type Reporter func(context.Context, Record)

Reporter records an internal diagnostic event at an owning boundary.

Jump to

Keyboard shortcuts

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