Skip to content

Commit

Permalink
refactor: Simplify metrics options check
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Nov 19, 2024
1 parent 2bf40ce commit 99bda97
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/options/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ func CheckTelemetryOptions(options system.TelemetryOptions) error {
}

func CheckMetricsOptions(options system.MetricsOptions) error {
if options.Enable {
if len(options.URL) == 0 {
return fmt.Errorf("No metrics endpoint specified - please use METRICS_URL or --metrics-url")
}
if options.Enable && len(options.URL) == 0 {
return fmt.Errorf("No metrics endpoint specified - please use METRICS_URL or --metrics-url")
}

return nil
Expand Down

0 comments on commit 99bda97

Please sign in to comment.