Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Cleanup internal names for RequestErrorHandler since moved to request package #12614

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exporter/exporterhelper/internal/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ type Request interface {
MergeSplit(context.Context, exporterbatcher.SizeConfig, Request) ([]Request, error)
}

// RequestErrorHandler is an optional interface that can be implemented by Request to provide a way handle partial
// ErrorHandler 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 interface {
type ErrorHandler interface {
Request
// OnError returns a new Request may contain the items left to be sent if some items failed to process and can be retried.
// Otherwise, it should return the original Request.
Expand Down
2 changes: 1 addition & 1 deletion exporter/exporterhelper/internal/retry_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (rs *retrySender) Send(ctx context.Context, req request.Request) error {
return fmt.Errorf("not retryable error: %w", err)
}

if errReq, ok := req.(request.RequestErrorHandler); ok {
if errReq, ok := req.(request.ErrorHandler); ok {
req = errReq.OnError(err)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ type Request = request.Request
// 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.RequestErrorHandler
type RequestErrorHandler = request.ErrorHandler
Loading