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

Function addIngestBlocks

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

addIngestBlocks adds the ingest.kafka configuration for microservices mode.

(m map[string]interface{}, mode, kafkaAddress, kafkaTopic string)

Source from the content-addressed store, hash-verified

200
201// addIngestBlocks adds the ingest.kafka configuration for microservices mode.
202func addIngestBlocks(m map[string]interface{}, mode, kafkaAddress, kafkaTopic string) error {
203 if mode == modeMonolithic {
204 return nil
205 }
206
207 if kafkaAddress == "" {
208 return fmt.Errorf("--kafka-address is required in microservices mode")
209 }
210
211 setNestedValue(m, []string{"ingest", "kafka", "address"}, kafkaAddress)
212 setNestedValue(m, []string{"ingest", "kafka", "topic"}, kafkaTopic)
213 return nil
214}
215
216// modifyOverrides sets compaction_disabled: true in the overrides defaults and
217// any inline per-tenant overrides, and warns about external per-tenant files.

Callers 2

TestAddIngestBlocksFunction · 0.85
RunMethod · 0.85

Calls 1

setNestedValueFunction · 0.85

Tested by 1

TestAddIngestBlocksFunction · 0.68