otelgen icon indicating copy to clipboard operation
otelgen copied to clipboard

log-level param is ignored

Open cforce opened this issue 1 year ago • 2 comments

It shall not print indo logs

otelgen --otel-exporter-otlp-endpoint localhost:4318 --protocol http --insecure --service-name otelgen --log-level warn --duration 30 metrics counter
{"level":"info","ts":1689025485.5422175,"caller":"cli/metrics_root.go:132","msg":"using","temporarility":"delta"}
{"level":"info","ts":1689025485.5423172,"caller":"cli/metrics_root.go:77","msg":"starting HTTP exporter"}
{"level":"info","ts":1689025485.542361,"caller":"cli/metrics_counter.go:58","msg":"Starting metrics generation"}
{"level":"error","ts":1689025485.542427,"caller":"metrics/worker.go:50","msg":"either `metrics` or `duration` must be greater than 0","stacktrace":"github.com/krzko/otelgen/internal/metrics.(*Worker).Run\n\t/home/runner/work/otelgen/otelgen/internal/metrics/worker.go:50\ngithub.com/krzko/otelgen/internal/metrics.run\n\t/home/runner/work/otelgen/otelgen/internal/metrics/worker.go:38\ngithub.com/krzko/otelgen/internal/metrics.SimulateCounter\n\t/home/runner/work/otelgen/otelgen/internal/metrics/counter.go:16\ngithub.com/krzko/otelgen/internal/cli.generateMetricsCounterAction\n\t/home/runner/work/otelgen/otelgen/internal/cli/metrics_counter.go:67\ngithub.com/krzko/otelgen/internal/cli.glob..func1\n\t/home/runner/work/otelgen/otelgen/internal/cli/metrics_counter.go:27\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:274\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267\ngithub.com/urfave/cli/v2.(*App).RunContext\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332\ngithub.com/urfave/cli/v2.(*App).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309\nmain.main\n\t/home/runner/work/otelgen/otelgen/cmd/otelgen/main.go:19\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.9/x64/src/runtime/proc.go:250"}    
{"level":"error","ts":1689025485.5424926,"caller":"metrics/counter.go:18","msg":"failed to run counter","error":"failed to run worker: either `metrics` or `duration` must be greater than 0","stacktrace":"github.com/krzko/otelgen/internal/metrics.SimulateCounter\n\t/home/runner/work/otelgen/otelgen/internal/metrics/counter.go:18\ngithub.com/krzko/otelgen/internal/cli.generateMetricsCounterAction\n\t/home/runner/work/otelgen/otelgen/internal/cli/metrics_counter.go:67\ngithub.com/krzko/otelgen/internal/cli.glob..func1\n\t/home/runner/work/otelgen/otelgen/internal/cli/metrics_counter.go:27\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:274\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267\ngithub.com/urfave/cli/v2.(*Command).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267\ngithub.com/urfave/cli/v2.(*App).RunContext\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332\ngithub.com/urfave/cli/v2.(*App).Run\n\t/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309\nmain.main\n\t/home/runner/work/otelgen/otelgen/cmd/otelgen/main.go:19\nruntime.main\n\t/opt/hostedtoolcache/go/1.19.9/x64/src/runtime/proc.go:250"}
{"level":"info","ts":1689025485.5425222,"caller":"cli/metrics_root.go:192","msg":"stopping the exporter"}
otelgen --otel-exporter-otlp-endpoint localhost:4317 --protocol grpc --insecure --service-name otelgen --log-level warn --du

cforce avatar Jul 10 '23 21:07 cforce