What this proposes:
Add a tempo-cli migrate config command that takes a Tempo 2.x configuration file and outputs a valid 3.0 configuration. This eliminates the most error-prone step of the migration — manually editing config files.
Usage:
tempo-cli migrate config [--kafka-address=<addr>] [--kafka-topic=<topic>] <2.x-config.yaml>
Outputs to stdout. The user reviews, saves, and deploys.
What it does:
-
Parse input YAML into a generic map (not Tempo structs — preserves unknown fields, passes through env vars like ${VAR} as-is).
-
Detect deployment mode from target field. Monolithic if target: all or absent (default). Accept --mode flag to override.
-
Delete 2.x-only blocks:
ingester
ingester_client
compactor
-
Add 3.0 blocks (microservices only):
ingest.kafka.address and ingest.kafka.topic from flags
- Error if
--kafka-address isn't provided in microservices mode
-
Modify overrides for parallel operation:
- Set
overrides.defaults.compaction.compaction_disabled: true
- Walk every tenant key under
overrides:, set compaction.compaction_disabled: true on each
- If the config references an external per-tenant file (
overrides.per_tenant_override_config), warn: "External overrides file at needs compaction_disabled added manually for each tenant"
-
Clean up metrics-generator:
- Remove
local_blocks processor config (any level — defaults and per-tenant)
- Warn if it was present: "local-blocks processor removed — block building is handled by the block-builder component"
-
Monolithic-specific: skip step 4, don't add ingest or block_builder blocks.
-
Validate output through Tempo's 3.0 config validation. Report errors.
-
Print to stdout with a comment header:
# Generated by tempo-cli migrate config
# Review before deploying. Remove compaction_disabled after decommissioning 2.x.
What it deliberately doesn't do:
- Doesn't touch
storage:, server:, distributor:, query_frontend:, memberlist: — those carry over unchanged
- Doesn't set partition count or block-builder replicas — those are deployment concerns, not config
- Doesn't handle legacy overrides format — detects it and errors with "run
tempo-cli migrate overrides-config first"
Example output:
$ tempo-cli migrate config --kafka-address=kafka:9092 --kafka-topic=tempo-traces old-config.yaml > new-config.yaml
WARN: local_blocks processor removed from metrics_generator config
WARN: External per-tenant overrides file /etc/tempo/overrides.yaml needs compaction_disabled added for each tenant
Implementation notes:
Working at the map[string]interface{} level loses YAML comments and key ordering from the original file. That's acceptable since the output is a starting point, not a final config. Working at the YAML AST node level would preserve structure but adds complexity for marginal benefit.
Related:
What this proposes:
Add a
tempo-cli migrate configcommand that takes a Tempo 2.x configuration file and outputs a valid 3.0 configuration. This eliminates the most error-prone step of the migration — manually editing config files.Usage:
Outputs to stdout. The user reviews, saves, and deploys.
What it does:
Parse input YAML into a generic map (not Tempo structs — preserves unknown fields, passes through env vars like
${VAR}as-is).Detect deployment mode from
targetfield. Monolithic iftarget: allor absent (default). Accept--modeflag to override.Delete 2.x-only blocks:
ingesteringester_clientcompactorAdd 3.0 blocks (microservices only):
ingest.kafka.addressandingest.kafka.topicfrom flags--kafka-addressisn't provided in microservices modeModify overrides for parallel operation:
overrides.defaults.compaction.compaction_disabled: trueoverrides:, setcompaction.compaction_disabled: trueon eachoverrides.per_tenant_override_config), warn: "External overrides file at needs compaction_disabled added manually for each tenant"Clean up metrics-generator:
local_blocksprocessor config (any level — defaults and per-tenant)Monolithic-specific: skip step 4, don't add ingest or block_builder blocks.
Validate output through Tempo's 3.0 config validation. Report errors.
Print to stdout with a comment header:
What it deliberately doesn't do:
storage:,server:,distributor:,query_frontend:,memberlist:— those carry over unchangedtempo-cli migrate overrides-configfirst"Example output:
Implementation notes:
Working at the
map[string]interface{}level loses YAML comments and key ordering from the original file. That's acceptable since the output is a starting point, not a final config. Working at the YAML AST node level would preserve structure but adds complexity for marginal benefit.Related:
tempo-cli migrate overrides-config