forked from mtusi2026/mtusi2026lab6
feat: ЛР6 - наблюдаемость OpenTelemetry, Grafana и исследование цены наблюдаемости
This commit is contained in:
+105
@@ -65,6 +65,10 @@ services:
|
||||
S3_SECRET_ACCESS_KEY: "minioadmin"
|
||||
MAX_UPLOAD_BYTES: "10485760"
|
||||
MAX_IMAGE_PIXELS: "40000000"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_TRACES_SAMPLER: "${OTEL_TRACES_SAMPLER:-always_on}"
|
||||
OTEL_TRACES_SAMPLER_ARG: "${OTEL_TRACES_SAMPLER_ARG:-1.0}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -112,6 +116,10 @@ services:
|
||||
S3_SECRET_ACCESS_KEY: "minioadmin"
|
||||
MAX_UPLOAD_BYTES: "10485760"
|
||||
MAX_IMAGE_PIXELS: "40000000"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_TRACES_SAMPLER: "${OTEL_TRACES_SAMPLER:-always_on}"
|
||||
OTEL_TRACES_SAMPLER_ARG: "${OTEL_TRACES_SAMPLER_ARG:-1.0}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -153,6 +161,10 @@ services:
|
||||
WORKER_CONCURRENCY: "4"
|
||||
WORKER_LEASE_SECONDS: "60"
|
||||
MAX_JOB_RETRIES: "5"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_TRACES_SAMPLER: "${OTEL_TRACES_SAMPLER:-always_on}"
|
||||
OTEL_TRACES_SAMPLER_ARG: "${OTEL_TRACES_SAMPLER_ARG:-1.0}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "python -c 'import pika, os; conn = pika.BlockingConnection(pika.URLParameters(os.environ[\"BROKER_URL\"])); conn.close()' || exit 1"]
|
||||
interval: 5s
|
||||
@@ -252,8 +264,101 @@ services:
|
||||
cpus: '0.50'
|
||||
memory: 512M
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.96.0
|
||||
restart: unless-stopped
|
||||
command: ["--config=/etc/otelcol-contrib/config.yaml"]
|
||||
volumes:
|
||||
- ./infra/otel/collector.yaml:/etc/otelcol-contrib/config.yaml:ro
|
||||
ports:
|
||||
- "4318:4318"
|
||||
depends_on:
|
||||
- prometheus
|
||||
- tempo
|
||||
- loki
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.51.0
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.path=/prometheus"
|
||||
- "--web.enable-lifecycle"
|
||||
volumes:
|
||||
- ./infra/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus_data:/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
tempo:
|
||||
image: grafana/tempo:2.4.1
|
||||
restart: unless-stopped
|
||||
command: ["-config.file=/etc/tempo.yaml"]
|
||||
volumes:
|
||||
- ./infra/tempo/tempo.yaml:/etc/tempo.yaml:ro
|
||||
- tempo_data:/var/tempo
|
||||
ports:
|
||||
- "3200:3200"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
loki:
|
||||
image: grafana/loki:3.0.0
|
||||
restart: unless-stopped
|
||||
command: ["-config.file=/etc/loki/local-config.yaml"]
|
||||
volumes:
|
||||
- ./infra/loki/loki.yaml:/etc/loki/local-config.yaml:ro
|
||||
- loki_data:/loki
|
||||
ports:
|
||||
- "3100:3100"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:10.4.1
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
volumes:
|
||||
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
- grafana_data:/var/lib/grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- prometheus
|
||||
- tempo
|
||||
- loki
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
redis_data:
|
||||
minio_data:
|
||||
rabbitmq_data:
|
||||
prometheus_data:
|
||||
tempo_data:
|
||||
loki_data:
|
||||
grafana_data:
|
||||
|
||||
Reference in New Issue
Block a user