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

Function newStoreWithLogger

modules/backendscheduler/provider/compaction_test.go:373–396  ·  view source on GitHub ↗
(ctx context.Context, t testing.TB, log log.Logger, tmpDir string)

Source from the content-addressed store, hash-verified

371}
372
373func newStoreWithLogger(ctx context.Context, t testing.TB, log log.Logger, tmpDir string) storage.Store {
374 s, err := storage.NewStore(storage.Config{
375 Trace: tempodb.Config{
376 Backend: backend.Local,
377 Local: &local.Config{
378 Path: tmpDir + "/traces",
379 },
380 Block: &common.BlockConfig{
381 BloomFP: 0.01,
382 BloomShardSizeBytes: 100_000,
383 Version: encoding.LatestEncoding().Version(),
384 },
385 WAL: &wal.Config{
386 Filepath: tmpDir + "/wal",
387 },
388 BlocklistPoll: 100 * time.Millisecond,
389 },
390 }, nil, log)
391 require.NoError(t, err)
392
393 s.EnablePolling(ctx, &ownsEverythingSharder{}, false)
394
395 return s
396}
397
398func writeTenantBlocks(ctx context.Context, t *testing.T, w backend.Writer, tenant string, count int) {
399 var err error

Callers 1

newStoreFunction · 0.70

Calls 4

NewStoreFunction · 0.92
LatestEncodingFunction · 0.92
VersionMethod · 0.65
EnablePollingMethod · 0.65

Tested by

no test coverage detected