mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
Don't crash if failing to create tracer provider
This commit is contained in:
@@ -117,9 +117,10 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
|
|||||||
func Run(ctx context.Context, rs *options.DeschedulerServer) error {
|
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)
|
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 {
|
if err != nil {
|
||||||
return err
|
klog.ErrorS(err, "failed to create tracer provider")
|
||||||
}
|
}
|
||||||
defer tracing.Shutdown(ctx)
|
defer tracing.Shutdown(ctx)
|
||||||
|
|
||||||
// increase the fake watch channel so the dry-run mode can be run
|
// increase the fake watch channel so the dry-run mode can be run
|
||||||
// over a cluster with thousands of pods
|
// over a cluster with thousands of pods
|
||||||
watch.DefaultChanSize = 100000
|
watch.DefaultChanSize = 100000
|
||||||
|
|||||||
Reference in New Issue
Block a user