Consolidate configuration parameters into centralized config structures instead of using scattered options structs or hardcoded values. Configuration should be owned and controlled by the appropriate component, with all related settings grouped together in well-organized config files.

Key principles:

Example transformation:

// Before: Scattered options struct
type ServerOptions struct {
    FluxInterval               string
    FluxIntervalForTraceDetail string
    HTTPHostPort               string
    // ... many scattered options
}

func NewServer(serverOptions *ServerOptions) (*Server, error) {
    // Complex parsing and handling
}

// After: Centralized config with direct parameters
func NewServer(config signoz.Config, signoz *signoz.SigNoz, jwt *authtypes.JWT) (*Server, error) {
    // Direct access to organized config
    reader := clickhouseReader.NewReader(
        signoz.SQLStore,
        signoz.TelemetryStore,
        config.Querier.FluxInterval, // Controlled by the right component
        // ...
    )
}

This approach improves maintainability, reduces configuration drift, and ensures that components have proper ownership of their settings. Avoid hardcoded constants like timeout values or version strings - make them configurable through the centralized config system.