grafana/devenv/docker/blocks/tempo/docker-compose.yaml
2022-10-20 10:44:59 -04:00

112 lines
2.6 KiB
YAML

x-logging: &default-logging
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
labels: namespace
loki-relabel-config: |
- action: replace
source_labels: ["namespace","compose_service"]
separator: "/"
target_label: job
- action: replace
source_labels: ["container_name"]
target_label: instance
version: "3"
services:
db:
image: grafana/tns-db:9c1ab38
command:
- '-log.level=debug'
ports:
- 0.0.0.0:8000:80
environment:
JAEGER_ENDPOINT: 'http://tempo:14268/api/traces'
JAEGER_TAGS: job=tns/db
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
labels:
namespace: tns
logging: *default-logging
app:
image: grafana/tns-app:9c1ab38
command:
- '-log.level=debug'
- 'http://db'
links:
- db
ports:
- 0.0.0.0:8001:80
environment:
JAEGER_ENDPOINT: 'http://tempo:14268/api/traces'
JAEGER_TAGS: job=tns/app
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
labels:
namespace: tns
logging: *default-logging
loadgen:
image: grafana/tns-loadgen:9c1ab38
command:
- '-log.level=debug'
- 'http://app'
links:
- app
ports:
- 0.0.0.0:8002:80
environment:
JAEGER_ENDPOINT: 'http://tempo:14268/api/traces'
JAEGER_TAGS: job=tns/loadgen
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
labels:
namespace: tns
logging: *default-logging
tempo:
image: grafana/tempo:latest
command:
- --config.file=/etc/tempo.yaml
- --search.enabled=true
volumes:
- ./docker/blocks/tempo/tempo.yaml:/etc/tempo.yaml
- ./docker/blocks/tempo/tempo-data:/tmp/tempo
ports:
- "14268:14268" # jaeger ingest
- "3200:3200" # tempo
- "4317:4317" # otlp grpc
- "4318:4318" # otlp http
prometheus:
image: prom/prometheus:main
command:
- --config.file=/etc/prometheus.yaml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
volumes:
- ./docker/blocks/tempo/prometheus.yaml:/etc/prometheus.yaml
links:
- app
- db
- loadgen
ports:
- "9090:9090"
labels:
namespace: monitoring
logging: *default-logging
loki:
image: grafana/loki:main
command:
- -config.file=/etc/loki/local-config.yaml
- -table-manager.retention-period=1d
- -table-manager.retention-deletes-enabled=true
ports:
- "3100:3100"
labels:
namespace: monitoring
logging: *default-logging