Documentation ¶
Overview ¶
Package internal contains common functionality for all OTLP exporters.
Package internal contains common functionality for all OTLP exporters.
Index ¶
- func CleanPath(urlPath string, defaultPath string) string
- func GetUserAgentHeader() string
- func MetricPartialSuccessError(itemsRejected int64, errorMessage string) error
- func TracePartialSuccessError(itemsRejected int64, errorMessage string) error
- func WrapTracesError(err error) error
- type ErrorKind
- type PartialSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 GetUserAgentHeader ¶ added in v1.11.0
func GetUserAgentHeader() string
GetUserAgentHeader return an OTLP header value form "OTel OTLP Exporter Go/{{ .Version }}" https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#user-agent
func MetricPartialSuccessError ¶ added in v1.11.2
MetricPartialSuccessError returns an error describing a partial success response for the metric signal.
func TracePartialSuccessError ¶ added in v1.11.2
TracePartialSuccessError returns an error describing a partial success response for the trace signal.
func WrapTracesError ¶ added in v1.12.0
WrapTracesError wraps an error from the OTLP exporter for traces.
Types ¶
type ErrorKind ¶ added in v1.12.0
type ErrorKind int
ErrorKind is used to identify the kind of export error being wrapped.
type PartialSuccess ¶ added in v1.10.0
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 ¶ added in v1.10.0
func (ps PartialSuccess) Error() string
Error implements the error interface.
func (PartialSuccess) Is ¶ added in v1.10.0
func (ps PartialSuccess) Is(err error) bool
Is supports the errors.Is() interface.