errors

package
v0.0.0-...-3736fb9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package errors is a replacement for the golang standard library "errors". This replacement adds errors to the Open Telemetry spans. The signatures only differs in that New() now takes a context.Context object and fmt.Errorf() has been moved here and also takes a Context.Context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(err error, target interface{}) bool

As implements errors.As().

func Errorf

func Errorf(ctx context.Context, s string, i ...interface{}) error

Errorf implements fmt.Errorf with the addition of a Context that if it contains a span will have the error added to the span.

func Is

func Is(err, target error) bool

Is implements errors.Is().

func New

func New(ctx context.Context, text string) error

New creates a new error and writes the error to a span if it exists in the context.

func Unwrap

func Unwrap(err error) error

Unwrap implemements errors.Unwrap().

Types

This section is empty.

Jump to

Keyboard shortcuts

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