diff --git a/cmd/satellite/main.go b/cmd/satellite/main.go index 31721550e..a12eed549 100644 --- a/cmd/satellite/main.go +++ b/cmd/satellite/main.go @@ -128,7 +128,7 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) { if err != nil { return errs.New("Error creating tables for master database on satellite: %+v", err) } - if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Identity.CertPath); err != nil { + if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Server.Identity.CertPath); err != nil { zap.S().Errorf("Failed to initialize telemetry batcher: %+v", err) } diff --git a/cmd/storagenode/main.go b/cmd/storagenode/main.go index e4a5f2a79..e3773d3c8 100644 --- a/cmd/storagenode/main.go +++ b/cmd/storagenode/main.go @@ -120,7 +120,7 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) { zap.S().Info("Operator wallet: ", operatorConfig.Wallet) } ctx := process.Ctx(cmd) - if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Identity.CertPath); err != nil { + if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Server.Identity.CertPath); err != nil { zap.S().Error("Failed to initialize telemetry batcher:", err) } diff --git a/cmd/uplink/cmd/run.go b/cmd/uplink/cmd/run.go index f50065be6..f938e58b1 100644 --- a/cmd/uplink/cmd/run.go +++ b/cmd/uplink/cmd/run.go @@ -47,14 +47,14 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) { return err } + if err := process.InitMetricsWithCertPath(ctx, nil, cfg.Identity.CertPath); err != nil { + zap.S().Errorf("Failed to initialize telemetry batcher: %v", err) + } _, err = metainfo.ListBuckets(ctx, storj.BucketListOptions{Direction: storj.After}) if err != nil { return fmt.Errorf("Failed to contact Satellite.\n"+ "Perhaps your configuration is invalid?\n%s", err) } - if err := process.InitMetricsWithCertPath(ctx, nil, cfg.Identity.CertPath); err != nil { - zap.S().Errorf("Failed to initialize telemetry batcher: %v", err) - } return cfg.Run(ctx) }