CheckConfig checks if config values are suspect and returns a bundled list of warnings and explanation.
()
| 166 | |
| 167 | // CheckConfig checks if config values are suspect and returns a bundled list of warnings and explanation. |
| 168 | func (c *Config) CheckConfig() []ConfigWarning { |
| 169 | var warnings []ConfigWarning |
| 170 | if c.LiveStore.CompleteBlockTimeout < c.StorageConfig.Trace.BlocklistPoll { |
| 171 | warnings = append(warnings, warnCompleteBlockTimeout) |
| 172 | } |
| 173 | |
| 174 | if c.BackendWorker.Compactor.BlockRetention < c.StorageConfig.Trace.BlocklistPoll { |
| 175 | warnings = append(warnings, warnBlockRetention) |
| 176 | } |
| 177 | |
| 178 | if c.BackendWorker.Compactor.RetentionConcurrency == 0 { |
| 179 | warnings = append(warnings, warnRetentionConcurrency) |
| 180 | } |
| 181 | |
| 182 | if c.StorageConfig.Trace.BlocklistPollConcurrency == 0 { |
| 183 | warnings = append(warnings, warnBlocklistPollConcurrency) |
| 184 | } |
| 185 | |
| 186 | if c.Distributor.LogReceivedSpans.Enabled { |
| 187 | warnings = append(warnings, warnLogReceivedTraces) |
| 188 | } |
| 189 | |
| 190 | if c.Distributor.LogDiscardedSpans.Enabled { |
| 191 | warnings = append(warnings, warnLogDiscardedTraces) |
| 192 | } |
| 193 | |
| 194 | if c.StorageConfig.Trace.Backend == backend.Local && !IsSingleBinary(c.Target) { |
| 195 | warnings = append(warnings, warnStorageTraceBackendLocal) |
| 196 | } |
| 197 | |
| 198 | if c.Frontend.MCPServer.Enabled { |
| 199 | warnings = append(warnings, warnMCPServerEnabled) |
| 200 | } |
| 201 | |
| 202 | dcWarnings, dcErr := c.StorageConfig.Trace.Block.DedicatedColumns.Validate() |
| 203 | if dcErr != nil { |
| 204 | warnings = append(warnings, ConfigWarning{ |
| 205 | Message: dcErr.Error(), |
| 206 | Explain: "Tempo will not start with an invalid dedicated attribute column configuration", |
| 207 | }) |
| 208 | } |
| 209 | for _, warning := range dcWarnings { |
| 210 | warnings = append(warnings, ConfigWarning{ |
| 211 | Message: warning.Error(), |
| 212 | Explain: "Dedicated attribute column configuration contains an invalid configuration that will be ignored", |
| 213 | }) |
| 214 | } |
| 215 | |
| 216 | if c.tracesAndOverridesStorageConflict() { |
| 217 | warnings = append(warnings, warnTracesAndUserConfigurableOverridesStorageConflict) |
| 218 | } |
| 219 | |
| 220 | if c.Overrides.ConfigType == overrides.ConfigTypeLegacy { |
| 221 | warnings = append(warnings, warnLegacyOverridesConfig) |
| 222 | } |
| 223 | |
| 224 | if c.StorageConfig.Trace.Backend == backend.S3 && c.StorageConfig.Trace.S3.NativeAWSAuthEnabled { |
| 225 | warnings = append(warnings, warnNativeAWSAuthEnabled) |