Skip to content

Commit

Permalink
Don't crash if failing to create tracer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
damemi committed Jun 6, 2024
1 parent d699454 commit 47cc875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/descheduler/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
func Run(ctx context.Context, rs *options.DeschedulerServer) error {
err := tracing.NewTracerProvider(ctx, rs.Tracing.CollectorEndpoint, rs.Tracing.TransportCert, rs.Tracing.ServiceName, rs.Tracing.ServiceNamespace, rs.Tracing.SampleRate, rs.Tracing.FallbackToNoOpProviderOnError)
if err != nil {
return err
klog.ErrorS(err, "failed to create tracer provider")
}
defer tracing.Shutdown(ctx)

// increase the fake watch channel so the dry-run mode can be run
// over a cluster with thousands of pods
watch.DefaultChanSize = 100000
Expand Down

0 comments on commit 47cc875

Please sign in to comment.