Requirement
Summary
Several commands in the Jaeger codebase use panic() for error handling. This issue proposes replacing those panic() calls with proper error returns and handling to improve robustness and prevent unexpected runtime crashes.
Files Affected
cmd/tracegen/main.go
cmd/es-rollover/app/flags.go
cmd/es-index-cleaner/app/flags.go
cmd/internal/flags/flags.go
Problem
Using panic() for expected error scenarios:
- Causes abrupt application crashes
- Makes CLI tools less user-friendly
- Prevents graceful error reporting and testing
Proposed Solution
- Replace
panic(err) with proper error returns.
- Update callers to handle and propagate errors appropriately.
- Improve error messages to be more descriptive and user-friendly.
- Add or update tests to cover error paths where applicable.
Impact
- Improves stability and reliability of Jaeger CLI tools
- Aligns with Go best practices for error handling
- No functional or API-breaking changes
Requirement
Summary
Several commands in the Jaeger codebase use
panic()for error handling. This issue proposes replacing thosepanic()calls with proper error returns and handling to improve robustness and prevent unexpected runtime crashes.Files Affected
cmd/tracegen/main.gocmd/es-rollover/app/flags.gocmd/es-index-cleaner/app/flags.gocmd/internal/flags/flags.goProblem
Using
panic()for expected error scenarios:Proposed Solution
panic(err)with proper error returns.Impact