Skip to content

Commit

Permalink
improve error message and create event when upgrade fails
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <[email protected]>
  • Loading branch information
frzifus committed Oct 7, 2022
1 parent c38db31 commit 0bbe115
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/collector/upgrade/v0_61_0.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package upgrade

import (
"errors"
"fmt"
"strings"

Expand Down Expand Up @@ -56,11 +57,13 @@ func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (
}

const issueID = "https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707"
return nil, fmt.Errorf(
errStr := fmt.Sprintf(
"jaegerremotesampling is no longer available as receiver configuration. "+
"Please use the extension instead. See: %s",
"Please use the extension instead with a different remote sampling port. See: %s",
issueID,
)
u.Recorder.Event(otelcol, "Error", "Upgrade", errStr)
return nil, errors.New(errStr)
}
return otelcol, nil
}

0 comments on commit 0bbe115

Please sign in to comment.