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

Docker Compose(traces): Enable caches #56

Merged
merged 1 commit into from
Mar 19, 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 docker-compose/common/compose-include/memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
memcached:
labels:
- metrics.agent.grafana.com/scrape=false
image: ${MEMCACHED_IMAGE:-memcached:1.6.24-alpine}
image: ${MEMCACHED_IMAGE:-docker.io/memcached:1.6.24-alpine}

memcached-exporter:
labels:
Expand Down
5 changes: 0 additions & 5 deletions docker-compose/common/config/agent-flow/traces.river
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,3 @@ module.file "traces_primary" {
traces_forward_to = [module.file.lgtmp_provider_local.exports.traces_receiver]
}
}

tracing {
sampling_fraction = 0.8
write_to = [module.file.traces_primary.exports.agent_traces_input]
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ memberlist:
join_members:
- loki-memberlist:7946

# https://github.com/grafana/loki/blob/main/docs/sources/configure/_index.md#query_range
query_range:
align_queries_with_step: true

cache_results: true
results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"

cache_index_stats_results: true
index_stats_results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"

limits_config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ memberlist:
join_members:
- loki-memberlist:7946

# https://github.com/grafana/loki/blob/main/docs/sources/configure/_index.md#query_range
query_range:
align_queries_with_step: true

cache_results: true
results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"

cache_index_stats_results: true
index_stats_results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"
# cache_volume_results: true
# cache_series_results: true
Expand All @@ -56,17 +55,14 @@ query_range:
# instant_metric_results_cache:
# cache:
# memcached_client:
# consistent_hash: true
# addresses: "dns+memcached:11211"
# series_results_cache:
# cache:
# memcached_client:
# consistent_hash: true
# addresses: dns+memcached:11211"
# volume_results_cache:
# cache:
# memcached_client:
# consistent_hash: true
# addresses: "dns+memcached:11211"

limits_config:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ memberlist:
join_members:
- loki-memberlist:7946

# https://github.com/grafana/loki/blob/main/docs/sources/configure/_index.md#query_range
query_range:
align_queries_with_step: true

cache_results: true
results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"

cache_index_stats_results: true
index_stats_results_cache:
cache:
memcached_client:
consistent_hash: true
addresses: "dns+memcached:11211"

limits_config:
Expand Down
12 changes: 6 additions & 6 deletions docker-compose/common/config/tempo/gateway_tempo.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ server {
}

location = /distributor/ring {
proxy_pass http://${TEMPO_DISTRIBUTOR_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_DISTRIBUTOR_HOST}:3200$request_uri;
}
location = /ingester/ring {
proxy_pass http://${TEMPO_DISTRIBUTOR_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_DISTRIBUTOR_HOST}:3200$request_uri;
}

# Ingester endpoints
location = /flush {
proxy_pass http://${TEMPO_INGESTER_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_INGESTER_HOST}:3200$request_uri;
}
location = /shutdown {
proxy_pass http://${TEMPO_INGESTER_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_INGESTER_HOST}:3200$request_uri;
}

# Query endpoints
location ^~ /api {
proxy_pass http://${TEMPO_QUERY_FRONTEND_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_QUERY_FRONTEND_HOST}:3200$request_uri;
}

# Compactor endpoint
location = /compactor/ring {
proxy_pass http://${TEMPO_COMPACTOR_HOST}:3100$request_uri;
proxy_pass http://${TEMPO_COMPACTOR_HOST}:3200$request_uri;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ metrics_generator:
X-Scope-OrgID: "anonymous"

server:
http_listen_port: 3100
http_listen_port: 3200
grpc_listen_port: 9095
log_level: info

Expand All @@ -82,8 +82,24 @@ storage:
insecure: ${TEMPO_S3_INSECURE:-true}
tls_insecure_skip_verify: true

# https://github.com/grafana/tempo/blob/main/docs/sources/tempo/configuration/_index.md#cache
cache:
background:
writeback_goroutines: 5
caches:
- roles:
- bloom
- parquet-footer
- parquet-page
- frontend-search
- parquet-column-idx
- parquet-offset-idx
memcached:
addresses: "dns+memcached:11211"

# Global override configuration.
overrides:
per_tenant_override_config: /etc/tempo/overrides.yaml
defaults:
metrics_generator:
processors:
Expand Down
16 changes: 16 additions & 0 deletions docker-compose/common/config/tempo/monolithic-mode-traces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,24 @@ storage:
insecure: ${TEMPO_S3_INSECURE:-true}
tls_insecure_skip_verify: true

# https://github.com/grafana/tempo/blob/main/docs/sources/tempo/configuration/_index.md#cache
cache:
background:
writeback_goroutines: 5
caches:
- roles:
- bloom
- parquet-footer
- parquet-page
- frontend-search
- parquet-column-idx
- parquet-offset-idx
memcached:
addresses: "dns+memcached:11211"

# Global override configuration.
overrides:
per_tenant_override_config: /etc/tempo/overrides.yaml
defaults:
metrics_generator:
processors:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose/common/config/tempo/overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
overrides:
{}
27 changes: 12 additions & 15 deletions docker-compose/microservices-mode/traces/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ services:
condition: service_started
image: &tempoImage ${TEMPO_IMAGE:-docker.io/grafana/tempo:latest}
volumes:
- ../../common/config/tempo/microservices-mode-traces.yaml:/etc/tempo.yaml # Note: Tempo use microservices-mode-traces.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/tempo.yaml
- -config.file=/etc/tempo/microservices-mode-traces.yaml
- -target=distributor
- -config.expand-env=true
environment:
<<: *jaeger-environment
JAEGER_TAGS: app=distributor
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1" ]
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3200/ready || exit 1" ]
interval: 15s
timeout: 10s
retries: 5
Expand All @@ -77,9 +77,9 @@ services:
condition: service_healthy
image: *tempoImage
volumes:
- ../../common/config/tempo/microservices-mode-traces.yaml:/etc/tempo.yaml # Note: Tempo use microservices-mode-traces.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/tempo.yaml
- -config.file=/etc/tempo/microservices-mode-traces.yaml
- -target=ingester
- -config.expand-env=true
environment:
Expand All @@ -98,9 +98,9 @@ services:
condition: service_healthy
image: *tempoImage
volumes:
- ../../common/config/tempo/microservices-mode-traces.yaml:/etc/tempo.yaml # Note: Tempo use microservices-mode-traces.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/tempo.yaml
- -config.file=/etc/tempo/microservices-mode-traces.yaml
- -target=query-frontend
- -config.expand-env=true
environment:
Expand All @@ -115,9 +115,9 @@ services:
condition: service_started
image: *tempoImage
volumes:
- ../../common/config/tempo/microservices-mode-traces.yaml:/etc/tempo.yaml # Note: Tempo use microservices-mode-traces.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/tempo.yaml
- -config.file=/etc/tempo/microservices-mode-traces.yaml
- -target=querier
- -config.expand-env=true
environment:
Expand All @@ -130,10 +130,11 @@ services:
condition: service_healthy
image: *tempoImage
volumes:
- ../../common/config/tempo/microservices-mode-traces.yaml:/etc/tempo.yaml # Note: Tempo use microservices-mode-traces.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/tempo.yaml
- -config.file=/etc/tempo/microservices-mode-traces.yaml
- -target=compactor
- -config.expand-env=true
environment:
<<: *jaeger-environment
JAEGER_TAGS: app=compactor
Expand All @@ -146,13 +147,9 @@ services:
volumes:
- ../../common/config/mimir:/etc/mimir
command:
# - -config.file=/etc/mimir/monolithic-mode.yaml
- -config.file=/etc/mimir/monolithic-mode-metrics.yaml
- -target=all
- -config.expand-env=true
environment:
<<: *jaeger-environment
JAEGER_TAGS: app=mimir
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/ready || exit 1" ]
interval: 10s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ services:
condition: service_healthy
image: ${TEMPO_IMAGE:-docker.io/grafana/tempo:latest}
volumes:
- ../../common/config/tempo/monolithic-mode-traces.yaml:/etc/config.yaml
- ../../common/config/tempo:/etc/tempo
command:
- -config.file=/etc/config.yaml
- -config.file=/etc/tempo/monolithic-mode-traces.yaml
- -target=all
- -config.expand-env=true
environment:
Expand All @@ -158,7 +158,7 @@ services:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3200/ready || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
retries: 10
# expose 33200 port so we can directly access tempo inside container
ports:
- "33200:3200"
Expand Down
Empty file.

This file was deleted.

Loading