diff --git a/internal/coreinternal/errorutil/http.go b/internal/coreinternal/errorutil/http.go index 571e555e9773..930f0fd51fcd 100644 --- a/internal/coreinternal/errorutil/http.go +++ b/internal/coreinternal/errorutil/http.go @@ -17,6 +17,12 @@ func HTTPError(w http.ResponseWriter, err error) { } func GetHTTPStatusCodeFromError(err error) int { + // See requirements for receviers + // https://github.com/open-telemetry/opentelemetry-collector/blob/8e522ad950de6326a0841d7e1bef808bbc0d3537/receiver/doc.go#L10-L29 + + // See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1 + // to see a list of retryable http status codes. + // non-retryable status status := http.StatusBadRequest if !consumererror.IsPermanent(err) {