consumererror

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 109

Documentation

Overview

Package consumererror provides wrappers to easily classify errors. This allows appropriate action by error handlers without the need to know each individual error type/instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPermanent

func IsPermanent(err error) bool

IsPermanent checks if an error was wrapped with the NewPermanent function, which is used to indicate that a given error will always be returned in the case that its sources receives the same input.

func NewLogs

func NewLogs(err error, data plog.Logs) error

NewLogs creates a Logs that can encapsulate received data that failed to be processed or sent.

func NewMetrics

func NewMetrics(err error, data pmetric.Metrics) error

NewMetrics creates a Metrics that can encapsulate received data that failed to be processed or sent.

func NewPermanent

func NewPermanent(err error) error

NewPermanent wraps an error to indicate that it is a permanent error, i.e. an error that will be always returned if its source receives the same inputs.

func NewTraces

func NewTraces(err error, data ptrace.Traces) error

NewTraces creates a Traces that can encapsulate received data that failed to be processed or sent.

Types

type Logs

type Logs struct {
	// contains filtered or unexported fields
}

Logs is an error that may carry associated Log data for a subset of received data that failed to be processed or sent.

func (Logs) Data added in v0.73.0

func (err Logs) Data() V

Data returns the telemetry data that failed to be processed or sent.

func (Logs) Unwrap

func (err Logs) Unwrap() error

Unwrap returns the wrapped error for functions Is and As in standard package errors.

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics is an error that may carry associated Metrics data for a subset of received data that failed to be processed or sent.

func (Metrics) Data added in v0.73.0

func (err Metrics) Data() V

Data returns the telemetry data that failed to be processed or sent.

func (Metrics) Unwrap

func (err Metrics) Unwrap() error

Unwrap returns the wrapped error for functions Is and As in standard package errors.

type Traces

type Traces struct {
	// contains filtered or unexported fields
}

Traces is an error that may carry associated Trace data for a subset of received data that failed to be processed or sent.

func (Traces) Data added in v0.73.0

func (err Traces) Data() V

Data returns the telemetry data that failed to be processed or sent.

func (Traces) Unwrap

func (err Traces) Unwrap() error

Unwrap returns the wrapped error for functions Is and As in standard package errors.

Jump to

Keyboard shortcuts

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