Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rhythm] Extract block-builder into its own module #4396

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ jsonnet-test: tools-image ## Test jsonnet
.PHONY: docker-serverless test-serverless
docker-serverless: ## Build docker Tempo serverless
$(MAKE) -C cmd/tempo-serverless build-docker

test-serverless: ## Run Tempo serverless tests
$(MAKE) -C cmd/tempo-serverless test

Expand Down
9 changes: 9 additions & 0 deletions cmd/tempo/app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ func (c *Config) CheckConfig() []ConfigWarning {
warnings = append(warnings, warnTraceByIDConcurrentShards)
}

if c.BlockBuilder.BlockConfig.BlockCfg.Version != c.BlockBuilder.WAL.Version {
warnings = append(warnings, warnBlockAndWALVersionMismatch)
}

return warnings
}

Expand Down Expand Up @@ -308,6 +312,11 @@ var (
Message: "c.Frontend.TraceByID.ConcurrentShards greater than query_shards is invalid. concurrent_shards will be set to query_shards",
Explain: "Please remove ConcurrentShards or set it to a value less than or equal to QueryShards",
}

warnBlockAndWALVersionMismatch = ConfigWarning{
Message: "c.BlockConfig.BlockCfg.Version != c.WAL.Version",
Explain: "Block version and WAL version must match. WAL version will be set to block version",
}
)

func newV2Warning(setting string) ConfigWarning {
Expand Down
7 changes: 2 additions & 5 deletions cmd/tempo/app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ const (
// composite targets
SingleBinary string = "all"
ScalableSingleBinary string = "scalable-single-binary"
// GeneratorBuilder is a composite target that includes the metrics-generator and the block-builder
GeneratorBuilder string = "generator-builder"

// ring names
ringIngester string = "ingester"
Expand Down Expand Up @@ -673,15 +671,14 @@ func (t *App) setupModuleManager() error {
QueryFrontend: {Common, Store, OverridesAPI},
Distributor: {Common, IngesterRing, MetricsGeneratorRing, PartitionRing},
Ingester: {Common, Store, MemberlistKV, PartitionRing},
MetricsGenerator: {Common, OptionalStore, MemberlistKV, BlockBuilder, PartitionRing},
MetricsGenerator: {Common, OptionalStore, MemberlistKV, PartitionRing},
Querier: {Common, Store, IngesterRing, MetricsGeneratorRing, SecondaryIngesterRing},
Compactor: {Common, Store, MemberlistKV},
BlockBuilder: {Common, Store, MemberlistKV, PartitionRing},

// composite targets
SingleBinary: {Compactor, QueryFrontend, Querier, Ingester, Distributor, MetricsGenerator},
SingleBinary: {Compactor, QueryFrontend, Querier, Ingester, Distributor, MetricsGenerator, BlockBuilder},
ScalableSingleBinary: {SingleBinary},
// GeneratorBuilder: {MetricsGenerator, BlockBuilder},
}

for mod, targets := range deps {
Expand Down
60 changes: 46 additions & 14 deletions example/docker-compose/ingest-storage/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ services:
image: *tempoImage
depends_on:
- kafka
command: "-target=metrics-generator -config.file=/etc/tempo.yaml -block-builder.assigned-partitions=[0,1,2]"
command: "-target=metrics-generator -config.file=/etc/tempo.yaml"
hostname: metrics-generator-0
restart: always
volumes:
- ./tempo.yaml:/etc/tempo.yaml
Expand All @@ -122,19 +123,50 @@ services:
# environment:
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://alloy:4318

# metrics-generator-1:
# image: *tempoImage
# depends_on:
# - kafka
# command: "-target=metrics-generator -config.file=/etc/tempo.yaml"
# restart: always
# volumes:
# - ./tempo.yaml:/etc/tempo.yaml
# ports:
# - "3200" # tempo
# # Uncomment the following lines to enable tracing
# # environment:
# # - OTEL_EXPORTER_OTLP_ENDPOINT=http://alloy:4318
metrics-generator-1:
image: *tempoImage
depends_on:
- kafka
command: "-target=metrics-generator -config.file=/etc/tempo.yaml"
hostname: metrics-generator-1
restart: always
volumes:
- ./tempo.yaml:/etc/tempo.yaml
ports:
- "3200" # tempo
# Uncomment the following lines to enable tracing
# environment:
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://alloy:4318

block-builder-0:
image: *tempoImage
depends_on:
- kafka
command: "-target=block-builder -config.file=/etc/tempo.yaml"
hostname: block-builder-0
restart: always
volumes:
- ./tempo.yaml:/etc/tempo.yaml
ports:
- "3200" # tempo
# Uncomment the following lines to enable tracing
# environment:
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://alloy:4318

block-builder-1:
image: *tempoImage
depends_on:
- kafka
command: "-target=block-builder -config.file=/etc/tempo.yaml"
hostname: block-builder-1
restart: always
volumes:
- ./tempo.yaml:/etc/tempo.yaml
ports:
- "3200" # tempo
# Uncomment the following lines to enable tracing
# environment:
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://alloy:4318

minio:
image: minio/minio:latest
Expand Down
8 changes: 7 additions & 1 deletion example/docker-compose/ingest-storage/tempo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ metrics_generator:
send_exemplars: true
traces_storage:
path: /var/tempo/generator/traces
assigned_partitions:
metrics-generator-0: [0,2]
metrics-generator-1: [1]

storage:
trace:
Expand Down Expand Up @@ -76,4 +79,7 @@ ingest:

block_builder:
lookback_on_no_commit: 2m
consume_cycle_duration: 30s
consume_cycle_duration: 30s
assigned_partitions:
block-builder-0: [0,2]
block-builder-1: [1]
18 changes: 9 additions & 9 deletions example/tk/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subdir": "grafana"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "Y5nheroSOIwmE+djEVPq4OvvTxKenzdHhpEwaR3Ebjs="
},
{
Expand All @@ -18,8 +18,8 @@
"subdir": "grafana-builder"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"sum": "B49EzIY2WZsFxNMJcgRxE/gcZ9ltnS8pkOOV6Q5qioc="
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "yxqWcq/N3E/a/XreeU6EuE6X7kYPnG0AspAQFKOjASo="
},
{
"source": {
Expand All @@ -28,7 +28,7 @@
"subdir": "ksonnet-util"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "0y3AFX9LQSpfWTxWKSwoLgbt0Wc9nnCwhMH2szKzHv0="
},
{
Expand All @@ -38,7 +38,7 @@
"subdir": "kube-state-metrics/"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "q1YzD+I4InDdfQP6k93W9Lw5U1jpll3gVaS9rUzLR7U="
},
{
Expand All @@ -48,7 +48,7 @@
"subdir": "memcached"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "Cc715Y3rgTuimgDFIw+FaKzXSJGRYwt1pFTMbdrNBD8="
},
{
Expand All @@ -58,7 +58,7 @@
"subdir": "prometheus"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "b4scQI+UtFxkVgzzD3dfbPMwI7EVtyjv1uETEmizM8M="
},
{
Expand All @@ -68,7 +68,7 @@
"subdir": "tanka-util"
}
},
"version": "84e49c8549fa472c963862f233422c8b368afabe",
"version": "57b0b85dc1d7ed5e30c2e41f3bd26744b8aef519",
"sum": "ShSIissXdvCy1izTCDZX6tY7qxCoepE5L+WJ52Hw7ZQ="
},
{
Expand All @@ -88,7 +88,7 @@
"subdir": "1.29"
}
},
"version": "bf9a62cfd32a58c071b8410bfcdec058475dd25e",
"version": "6ecbb7709baf27f44b2e48f3529741ae6754ae6a",
"sum": "i2w3hGbgQmaB73t5LJHSioPOVdYv8ZBvivHiDwZJVyI="
}
],
Expand Down
2 changes: 1 addition & 1 deletion example/tk/lib/k.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '1.21/main.libsonnet'
import '1.29/main.libsonnet'
Loading
Loading