MCPcopy
hub / github.com/grafana/tempo / CheckConfig

Method CheckConfig

cmd/tempo/app/config.go:168–261  ·  view source on GitHub ↗

CheckConfig checks if config values are suspect and returns a bundled list of warnings and explanation.

()

Source from the content-addressed store, hash-verified

166
167// CheckConfig checks if config values are suspect and returns a bundled list of warnings and explanation.
168func (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)

Callers 3

validateMigratedConfigFunction · 0.95
configIsValidFunction · 0.80
TestConfig_CheckConfigFunction · 0.80

Calls 7

KnownTransformationNamesFunction · 0.92
IsSingleBinaryFunction · 0.85
ValidateMethod · 0.65
ErrorMethod · 0.65
JoinMethod · 0.65

Tested by 1

TestConfig_CheckConfigFunction · 0.64