Skip to content

Commit

Permalink
debug loggin
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed May 18, 2022
1 parent 1b6823c commit cca854b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var rootCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
initCommon()

err := export.Serve(ctx, metricsPort)
err := export.Serve(cmd.Context(), metricsPort)
if err != nil {
logr.Fatal(err)
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,20 @@ func (e *exporter) Config(ctx context.Context) *Config {

func (e *exporter) Serve(ctx context.Context, port int) error {
if e.config.Execution.Enabled {
e.log.Info("Starting execution metrics...")

go e.execution.StartMetrics(ctx)
}

if e.config.DiskUsage.Enabled {
e.log.Info("Starting disk usage metrics...")

go e.diskUsage.StartAsync(ctx)
}

if e.config.Consensus.Enabled {
e.log.Info("Starting consensus metrics...")

go e.consensus.StartMetrics(ctx)
}

Expand Down

0 comments on commit cca854b

Please sign in to comment.