-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yaml
More file actions
207 lines (196 loc) · 5.07 KB
/
compose.yaml
File metadata and controls
207 lines (196 loc) · 5.07 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
networks:
default:
name: smells-like-clean-telemetry
driver: bridge
services:
songs-auto:
build:
context: ./auto
ports:
- 8080:8080
environment:
- MUSIC_SERVICE_URL=https://musicbrainz.org/ws/2/recording/
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_SERVICE_NAME=songs-auto
- OTEL_RESOURCE_ATTRIBUTES=service.version=0.0.1
- SPRING_DATASOURCE_URL=jdbc:postgresql://songs-db:5432/songs_db
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=password
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
depends_on:
otel-collector:
condition: service_healthy
profiles:
- auto
songs-db:
image: postgres:18.3-alpine3.22
ports:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=songs_db
volumes:
- ./songs-db/init-songs-db.sh:/docker-entrypoint-initdb.d/init-songs-db.sh
profiles:
- auto
- instrumentation-lib
- manual
- express-auto
songs-lib:
build:
context: ./instrumentation-lib
ports:
- 8081:8081
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_SERVICE_NAME=songs-lib
- OTEL_RESOURCE_ATTRIBUTES=service.version=1.0.0
- DATABASE_URL=postgresql://postgres:password@songs-db:5432/songs_db
- MUSIC_SERVICE_URL=https://musicbrainz.org/ws/2/recording/
depends_on:
otel-collector:
condition: service_healthy
profiles:
- instrumentation-lib
manual-python:
build:
context: ./manual-python
ports:
- 5000:5000
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_SERVICE_NAME=manual-python
- OTEL_RESOURCE_ATTRIBUTES=service.version=0.0.1
depends_on:
otel-collector:
condition: service_healthy
profiles:
- manual-python
songs-manual:
build:
context: ./manual
ports:
- 3000:3000
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_SERVICE_NAME=songs-manual
- OTEL_RESOURCE_ATTRIBUTES=service.version=0.1.0
- DB_HOST=songs-db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=password
- DB_NAME=songs_db
- MUSIC_SERVICE_URL=https://musicbrainz.org/ws/2/recording/
depends_on:
otel-collector:
condition: service_healthy
profiles:
- manual
express-auto:
build:
context: ./express-auto
ports:
- 3000:3000
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_SERVICE_NAME=express-auto
- OTEL_RESOURCE_ATTRIBUTES=service.version=0.1.0
- DB_HOST=songs-db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=password
- DB_NAME=songs_db
- MUSIC_SERVICE_URL=https://musicbrainz.org/ws/2/recording/
depends_on:
otel-collector:
condition: service_healthy
profiles:
- express-auto
jaeger:
image: cr.jaegertracing.io/jaegertracing/jaeger:2.16.0
ports:
- 16686:16686
- 4317
- 4318
profiles:
- auto
- instrumentation-lib
- manual
- manual-python
- express-auto
- weaver-emit
otel-collector:
build:
context: ./otel-collector
command:
- --config=/etc/otel-collector-config.yaml
volumes:
- ./otel-collector/otel-collector-config${OBSERVABILITY_BACKEND:+}-${OBSERVABILITY_BACKEND}.yaml:/etc/otel-collector-config.yaml
ports:
- 4317 # OTLP gRPC
- 4318 # OTLP HTTP
- 13133 # Health check HTTP
environment:
- OBSERVABILITY_BACKEND
- OTEL_COLLECTOR_HOST=otel-collector
- OTEL_COLLECTOR_PORT_GRPC=4317
- OTEL_COLLECTOR_PORT_HTTP=4318
- DD_SITE_PARAMETER
- DD_API_KEY
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:13133/health/status"]
interval: 10s
timeout: 10s
retries: 5
start_period: 20s
profiles:
- auto
- instrumentation-lib
- manual
- manual-python
- express-auto
###########################
# OTel Weaver scenarios #
###########################
weaver:
image: otel/weaver:v0.21.2
volumes:
- ./weaver/model:/home/weaver/model
restart: no
command:
- registry
- emit
- -r
- model
- --endpoint
- http://jaeger:4317
depends_on:
- jaeger
profiles:
- weaver-emit
weaver-check:
image: otel/weaver:v0.21.2
volumes:
- ./weaver/model:/home/weaver/model
restart: no
command:
- registry
- live-check
- -r
- model
- --inactivity-timeout
- "120"
profiles:
- weaver-check
weaver-check-manual-python:
build:
context: ./manual-python
ports:
- 5000:5000
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://weaver-check:4317
- OTEL_SERVICE_NAME=manual-python
- OTEL_RESOURCE_ATTRIBUTES=service.version=0.0.1
profiles:
- weaver-check