forked from SigNoz/opentelemetry-nodejs-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
96 lines (89 loc) · 2.43 KB
/
docker-compose.yml
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
version: "3.8"
services:
mongodb:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
networks:
- myapp-network
order:
build: ./order-service
ports:
- "3001:3001"
environment:
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_NODE_RESOURCE_DETECTORS=env,host,os
- OTEL_SERVICE_NAME=order-service
- NODE_OPTIONS=--require @opentelemetry/auto-instrumentations-node/register
depends_on:
- mongodb
- otel-collector
networks:
- myapp-network
payment:
build: ./payment-service
ports:
- "3002:3002"
environment:
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_NODE_RESOURCE_DETECTORS=env,host,os
- OTEL_SERVICE_NAME=payment-service
- NODE_OPTIONS=--require @opentelemetry/auto-instrumentations-node/register
depends_on:
- mongodb
- otel-collector
networks:
- myapp-network
product:
build: ./product-service
ports:
- "3003:3003"
environment:
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_NODE_RESOURCE_DETECTORS=env,host,os
- OTEL_SERVICE_NAME=product-service
- NODE_OPTIONS=--require @opentelemetry/auto-instrumentations-node/register
depends_on:
- mongodb
- otel-collector
networks:
- myapp-network
user:
build: ./user-service
ports:
- "3004:3004"
environment:
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_NODE_RESOURCE_DETECTORS=env,host,os
- OTEL_SERVICE_NAME=user-service
- NODE_OPTIONS=--require @opentelemetry/auto-instrumentations-node/register
depends_on:
- mongodb
- otel-collector
networks:
- myapp-network
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
command: ["--config", "/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
ports:
- "4317:4317"
- "4318:4318"
- "8888:8888"
- "2255:2255"
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}
- SIGNOZ_INGESTION_KEY=${SIGNOZ_INGESTION_KEY}
networks:
- myapp-network
networks:
myapp-network:
volumes:
mongo-data: