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 ¶
- func AsLogs(err error, target *Logs) bool
- func AsMetrics(err error, target *Metrics) bool
- func AsTraces(err error, target *Traces) bool
- func Combine(errs []error) errordeprecated
- func IsPermanent(err error) bool
- func NewLogs(err error, failed pdata.Logs) error
- func NewMetrics(err error, failed pdata.Metrics) error
- func NewPermanent(err error) error
- func NewTraces(err error, failed pdata.Traces) error
- type Logs
- type Metrics
- type Traces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsLogs ¶ added in v0.24.0
AsLogs finds the first error in err's chain that can be assigned to target. If such an error is found, it is assigned to target and true is returned, otherwise false is returned. Deprecated: Use `errors.As(err, target)` instead.
func AsMetrics ¶ added in v0.24.0
AsMetrics finds the first error in err's chain that can be assigned to target. If such an error is found, it is assigned to target and true is returned, otherwise false is returned. Deprecated: Use `errors.As(err, target)` instead.
func AsTraces ¶ added in v0.24.0
AsTraces finds the first error in err's chain that can be assigned to target. If such an error is found, it is assigned to target and true is returned, otherwise false is returned. Deprecated: Use `errors.As(err, target)` instead.
func IsPermanent ¶
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 ¶ added in v0.24.0
NewLogs creates a Logs that can encapsulate received data that failed to be processed or sent.
func NewMetrics ¶ added in v0.24.0
NewMetrics creates a Metrics that can encapsulate received data that failed to be processed or sent.
func NewPermanent ¶ added in v0.37.0
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.
Types ¶
type Logs ¶ added in v0.24.0
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.
type Metrics ¶ added in v0.24.0
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) GetMetrics ¶ added in v0.24.0
GetMetrics returns failed metrics from the associated error.
type Traces ¶ added in v0.24.0
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.