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

Function removeLocalBlocksProcessorConfig

cmd/tempo-cli/cmd-migrate-config.go:286–295  ·  view source on GitHub ↗

removeLocalBlocksProcessorConfig removes metrics_generator.processor.local_blocks from the given map (which should be either the top-level config or an overrides entry).

(m map[string]interface{}, warnings *[]string)

Source from the content-addressed store, hash-verified

284// removeLocalBlocksProcessorConfig removes metrics_generator.processor.local_blocks
285// from the given map (which should be either the top-level config or an overrides entry).
286func removeLocalBlocksProcessorConfig(m map[string]interface{}, warnings *[]string) {
287 proc, ok := extractNestedMap(m, "metrics_generator", "processor")
288 if !ok {
289 return
290 }
291 if _, ok := proc["local_blocks"]; ok {
292 delete(proc, "local_blocks")
293 *warnings = append(*warnings, "removed metrics_generator.processor.local_blocks (block building is handled by the block-builder component in 3.0)")
294 }
295}
296
297// removeLocalBlocksFromProcessorList filters "local-blocks" from the
298// metrics_generator.processors list within an overrides map.

Callers 1

cleanLocalBlocksFunction · 0.85

Calls 1

extractNestedMapFunction · 0.85

Tested by

no test coverage detected