diff --git a/exporter/otlpexporter/otlp.go b/exporter/otlpexporter/otlp.go index b520b26b277..c7ac37a3540 100644 --- a/exporter/otlpexporter/otlp.go +++ b/exporter/otlpexporter/otlp.go @@ -42,10 +42,6 @@ type exporterImp struct { w *grpcSender } -var ( - errPermanentError = consumererror.Permanent(errors.New("fatal error sending to server")) -) - // Crete new exporter and start it. The exporter will begin connecting but // this function may return before the connection is established. func newExporter(cfg configmodels.Exporter) (*exporterImp, error) { @@ -184,7 +180,7 @@ func processError(err error) error { if !shouldRetry(st.Code()) { // It is not a retryable error, we should not retry. - return errPermanentError + return consumererror.Permanent(err) } // Need to retry.