From 29dbc7c3ece7d86fe34534dda2e7bc2b909f7ab8 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Fri, 29 Nov 2024 23:10:31 +0300 Subject: [PATCH] chore(otelbench): use localPort --- cmd/otelbench/dump.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/otelbench/dump.go b/cmd/otelbench/dump.go index bdb6f094..bf108633 100644 --- a/cmd/otelbench/dump.go +++ b/cmd/otelbench/dump.go @@ -42,7 +42,6 @@ func newDumpCreateCommand() *cobra.Command { RunE: func(cobraCommand *cobra.Command, _ []string) error { g, ctx := errgroup.WithContext(cobraCommand.Context()) done := make(chan struct{}) - localPort := 9000 if err := os.MkdirAll(arg.Output, 0755); err != nil { return errors.Wrap(err, "create output directory") @@ -52,7 +51,7 @@ func newDumpCreateCommand() *cobra.Command { ctx, cancel := context.WithTimeout(ctx, 5*time.Second) defer cancel() client, err := ch.Dial(ctx, ch.Options{ - Address: fmt.Sprintf("localhost:%d", localPort), + Address: fmt.Sprintf("localhost:%d", arg.LocalPort), }) if err != nil { return errors.Wrap(err, "dial")