consumererror

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

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 IsPartialScrapeError

func IsPartialScrapeError(err error) bool

IsPartialScrapeError checks if an error was wrapped with PartialScrapeError.

func IsPermanent

func IsPermanent(err error) bool

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

func NewPartialScrapeError

func NewPartialScrapeError(err error, failed int) error

NewPartialScrapeError creates PartialScrapeError for failed metrics. Use this error type only when a subset of data was failed to be scraped.

func PartialLogsError

func PartialLogsError(err error, failedLogs pdata.Logs) error

PartialLogsError creates PartialError for failed logs. Use this error type only when a subset of received data set failed to be processed or sent.

func PartialMetricsError

func PartialMetricsError(err error, failedMetrics pdata.Metrics) error

PartialMetricsError creates PartialError for failed metrics. Use this error type only when a subset of received data set failed to be processed or sent.

func PartialTracesError

func PartialTracesError(err error, failed pdata.Traces) error

PartialTracesError creates PartialError for failed traces. Use this error type only when a subset of received data set failed to be processed or sent.

func Permanent

func Permanent(err error) error

Permanent 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 PartialError

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

PartialError can be used to signalize that a subset of received data failed to be processed or send. The preceding components in the pipeline can use this information for partial retries.

func (PartialError) GetLogs

func (err PartialError) GetLogs() pdata.Logs

GetLogs returns failed logs.

func (PartialError) GetMetrics

func (err PartialError) GetMetrics() pdata.Metrics

GetMetrics returns failed metrics.

func (PartialError) GetTraces

func (err PartialError) GetTraces() pdata.Traces

GetTraces returns failed traces.

type PartialScrapeError

type PartialScrapeError struct {
	Failed int
	// contains filtered or unexported fields
}

PartialScrapeError can be used to signalize that a subset of metrics were failed to be scraped

Jump to

Keyboard shortcuts

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