mirror of
https://github.com/mudler/LocalAI.git
synced 2026-03-31 21:25:59 -04:00
fix: Add tracing settings loading from runtime_settings.json (#9081)
Tracing settings (EnableTracing and TracingMaxItems) were not being loaded from runtime_settings.json on startup, causing tracing settings configured via WebUI to be lost after service restart. This fix adds proper loading of tracing settings in loadRuntimeSettingsFromFile function in core/application/startup.go. Fixes #9072 Co-authored-by: localai-bot <localai-bot@localai.io>
This commit is contained in:
@@ -432,6 +432,18 @@ func loadRuntimeSettingsFromFile(options *config.ApplicationConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
// Tracing settings
|
||||
if settings.EnableTracing != nil {
|
||||
if !options.EnableTracing {
|
||||
options.EnableTracing = *settings.EnableTracing
|
||||
}
|
||||
}
|
||||
if settings.TracingMaxItems != nil {
|
||||
if options.TracingMaxItems == 0 {
|
||||
options.TracingMaxItems = *settings.TracingMaxItems
|
||||
}
|
||||
}
|
||||
|
||||
xlog.Debug("Runtime settings loaded from runtime_settings.json")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user