mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
29 lines
1.9 KiB
Go
29 lines
1.9 KiB
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package xexporterhelper // import "go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper"
|
|
|
|
import "go.opentelemetry.io/collector/exporter/exporterhelper/internal/request" // Request represents a single request that can be sent to an external endpoint.
|
|
|
|
// Request represents a single request that can be sent to an external endpoint.
|
|
// Experimental: This API is at the early stage of development and may change without backward compatibility
|
|
// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
|
|
type Request = request.Request
|
|
|
|
// RequestErrorHandler is an optional interface that can be implemented by Request to provide a way handle partial
|
|
// temporary failures. For example, if some items failed to process and can be retried, this interface allows to
|
|
// return a new Request that contains the items left to be sent. Otherwise, the original Request should be returned.
|
|
// If not implemented, the original Request will be returned assuming the error is applied to the whole Request.
|
|
// Experimental: This API is at the early stage of development and may change without backward compatibility
|
|
// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
|
|
type RequestErrorHandler = request.ErrorHandler
|
|
|
|
// RequestConverterFunc converts pdata telemetry into a user-defined Request.
|
|
// Experimental: This API is at the early stage of development and may change without backward compatibility
|
|
// until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved.
|
|
type RequestConverterFunc[T any] = request.RequestConverterFunc[T]
|
|
|
|
// RequestConsumeFunc processes the request. After the function returns, the request is no longer accessible,
|
|
// and accessing it is considered undefined behavior.
|
|
type RequestConsumeFunc = request.RequestConsumeFunc
|