Files
Joe Elliottandzeekay e94374166e [Tempo 3.0] Remove compactor and v2 block encoding code (#6273)
* o7 compactor

Signed-off-by: Joe Elliott <[email protected]>

* wip: o7 v2

Signed-off-by: Joe Elliott <[email protected]>

* test cleanup

Signed-off-by: Joe Elliott <[email protected]>

* remove compactor from jsonnet

Signed-off-by: Joe Elliott <[email protected]>

* changelog

Signed-off-by: Joe Elliott <[email protected]>

* gen manifest

Signed-off-by: Joe Elliott <[email protected]>

* config cleanup

Signed-off-by: Joe Elliott <[email protected]>

* docs

Signed-off-by: Joe Elliott <[email protected]>

* jsonnet

Signed-off-by: Joe Elliott <[email protected]>

* remove encoding

Signed-off-by: Joe Elliott <[email protected]>

* remove data encoding

Signed-off-by: Joe Elliott <[email protected]>

* lint and cleanup

Signed-off-by: Joe Elliott <[email protected]>

* unflake TestWorker\?

Signed-off-by: Joe Elliott <[email protected]>

---------

Signed-off-by: Joe Elliott <[email protected]>
2026-02-22 00:55:18 -08:00

66 lines
2.8 KiB
Go

package storage
import (
"flag"
"github.com/grafana/tempo/pkg/cache"
"github.com/grafana/tempo/pkg/util"
"github.com/grafana/tempo/tempodb"
"github.com/grafana/tempo/tempodb/backend/azure"
"github.com/grafana/tempo/tempodb/backend/gcs"
"github.com/grafana/tempo/tempodb/backend/local"
"github.com/grafana/tempo/tempodb/backend/s3"
"github.com/grafana/tempo/tempodb/encoding"
"github.com/grafana/tempo/tempodb/encoding/common"
"github.com/grafana/tempo/tempodb/pool"
"github.com/grafana/tempo/tempodb/wal"
)
// Config is the Tempo storage configuration
type Config struct {
Trace tempodb.Config `yaml:"trace"`
}
// RegisterFlagsAndApplyDefaults registers the flags.
func (cfg *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet) {
cfg.Trace.BlocklistPollFallback = true
cfg.Trace.BlocklistPollConcurrency = tempodb.DefaultBlocklistPollConcurrency
cfg.Trace.BlocklistPollTenantIndexBuilders = tempodb.DefaultTenantIndexBuilders
cfg.Trace.BlocklistPollTolerateConsecutiveErrors = tempodb.DefaultTolerateConsecutiveErrors
cfg.Trace.BlocklistPollTolerateTenantFailures = tempodb.DefaultTolerateTenantFailures
f.StringVar(&cfg.Trace.Backend, util.PrefixConfig(prefix, "trace.backend"), "", "Trace backend (s3, azure, gcs, local)")
f.DurationVar(&cfg.Trace.BlocklistPoll, util.PrefixConfig(prefix, "trace.blocklist_poll"), tempodb.DefaultBlocklistPoll, "Period at which to run the maintenance cycle.")
cfg.Trace.WAL = &wal.Config{}
cfg.Trace.WAL.RegisterFlags(f)
f.StringVar(&cfg.Trace.WAL.Filepath, util.PrefixConfig(prefix, "trace.wal.path"), "/var/tempo/wal", "Path at which store WAL blocks.")
cfg.Trace.Search = &tempodb.SearchConfig{}
cfg.Trace.Search.RegisterFlagsAndApplyDefaults(prefix, f)
cfg.Trace.Block = &common.BlockConfig{}
cfg.Trace.Block.Version = encoding.DefaultEncoding().Version()
cfg.Trace.Block.RegisterFlagsAndApplyDefaults(prefix, f)
cfg.Trace.Azure = &azure.Config{}
cfg.Trace.Azure.RegisterFlagsAndApplyDefaults(util.PrefixConfig(prefix, "trace"), f)
cfg.Trace.S3 = &s3.Config{}
cfg.Trace.S3.RegisterFlagsAndApplyDefaults(util.PrefixConfig(prefix, "trace"), f)
cfg.Trace.GCS = &gcs.Config{}
cfg.Trace.GCS.RegisterFlagsAndApplyDefaults(util.PrefixConfig(prefix, "trace"), f)
cfg.Trace.Local = &local.Config{}
cfg.Trace.Local.RegisterFlagsAndApplyDefaults(util.PrefixConfig(prefix, "trace"), f)
cfg.Trace.BackgroundCache = &cache.BackgroundConfig{}
cfg.Trace.BackgroundCache.WriteBackBuffer = 10000
cfg.Trace.BackgroundCache.WriteBackGoroutines = 10
cfg.Trace.Pool = &pool.Config{}
f.IntVar(&cfg.Trace.Pool.MaxWorkers, util.PrefixConfig(prefix, "trace.pool.max-workers"), 400, "Workers in the worker pool.")
f.IntVar(&cfg.Trace.Pool.QueueDepth, util.PrefixConfig(prefix, "trace.pool.queue-depth"), 20000, "Work item queue depth.")
}