-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathdocker-compose.tracing.yml
More file actions
124 lines (118 loc) · 3.52 KB
/
Copy pathdocker-compose.tracing.yml
File metadata and controls
124 lines (118 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: '3.8'
services:
jaeger:
image: jaegertracing/all-in-one:latest
container_name: predictiq-jaeger
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "14250:14250" # Jaeger gRPC
- "14268:14268" # Jaeger HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
- LOG_LEVEL=info
# Resource limits: Jaeger can consume significant memory with high trace volume
# CPU: 1 core, Memory: 1GB (adjust based on trace volume)
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
networks:
- predictiq-tracing
zipkin:
image: openzipkin/zipkin:latest
container_name: predictiq-zipkin
ports:
- "9411:9411" # Zipkin UI and API
# Resource limits: Zipkin is lightweight but should be bounded
# CPU: 0.5 core, Memory: 512MB
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
networks:
- predictiq-tracing
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: predictiq-otel-collector
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "8888:8888" # Prometheus metrics
- "13133:13133" # Health check
environment:
- JAEGER_ENDPOINT=${JAEGER_ENDPOINT:-jaeger:14250}
- ZIPKIN_ENDPOINT=${ZIPKIN_ENDPOINT:-http://zipkin:9411/api/v2/spans}
# Resource limits: OTEL collector processes and exports traces
# CPU: 0.5 core, Memory: 512MB (adjust based on throughput)
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
depends_on:
- jaeger
- zipkin
networks:
- predictiq-tracing
# ── TTS Service ──────────────────────────────────────────────────────────────
# Included so the TTS service can export traces to the OpenTelemetry Collector
# running in this compose stack.
tts:
build:
context: ./services/tts
dockerfile: Dockerfile
container_name: predictiq-tts
ports:
- "3000:3000"
environment:
- TTS_PROVIDER=${TTS_PROVIDER:-elevenlabs}
- ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY:-}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS:-}
- TTS_OUTPUT_DIR=/tmp/tts-output
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_SERVICE_NAME=predictiq-tts
volumes:
- tts-output:/tmp/tts-output
healthcheck:
test:
- "CMD"
- "node"
- "-e"
- "require('http').get('http://localhost:3000/health/live',(r)=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))"
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
depends_on:
- otel-collector
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
networks:
- predictiq-tracing
networks:
predictiq-tracing:
driver: bridge
volumes:
tts-output: