package internal
import "go.opentelemetry.io/otel/exporters/otlp/internal"
Package internal contains common functionality for all OTLP exporters.
Deprecated: package internal exists for historical compatibility, it should not be used.
Index ¶
- func CleanPath(urlPath string, defaultPath string) string
- func MetricPartialSuccessError(itemsRejected int64, errorMessage string) error
- func TracePartialSuccessError(itemsRejected int64, errorMessage string) error
- func WrapTracesError(err error) error
- type ErrorKind
- type PartialSuccess
Functions ¶
func CleanPath ¶
CleanPath returns a path with all spaces trimmed and all redundancies removed. If urlPath is empty or cleaning it results in an empty string, defaultPath is returned instead.
func MetricPartialSuccessError ¶
MetricPartialSuccessError returns an error describing a partial success response for the metric signal.
func TracePartialSuccessError ¶
TracePartialSuccessError returns an error describing a partial success response for the trace signal.
func WrapTracesError ¶
WrapTracesError wraps an error from the OTLP exporter for traces.
Types ¶
type ErrorKind ¶
type ErrorKind int
ErrorKind is used to identify the kind of export error being wrapped.
const ( // TracesExport indicates the error comes from the OTLP trace exporter. TracesExport ErrorKind = iota )
type PartialSuccess ¶
PartialSuccess represents the underlying error for all handling OTLP partial success messages. Use `errors.Is(err, PartialSuccess{})` to test whether an error passed to the OTel error handler belongs to this category.
func (PartialSuccess) Error ¶
func (ps PartialSuccess) Error() string
Error implements the error interface.
func (PartialSuccess) Is ¶
func (ps PartialSuccess) Is(err error) bool
Is supports the errors.Is() interface.
Source Files ¶
config.go partialsuccess.go wrappederror.go
Directories ¶
Path | Synopsis |
---|---|
exporters/otlp/internal/envconfig | Package envconfig contains common functionality for all OTLP exporter configuration. |
- Version
- v1.17.0
- Published
- Aug 28, 2023
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 56 seconds ago –
Tools for package owners.