-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
114 lines (109 loc) · 3.65 KB
/
docker-compose.yaml
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
version: '3.9'
x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
networks:
default:
name: opentelemetry-demo
driver: bridge
services:
# ********************
# Telemetry Components
# ********************
# Jaeger
jaeger:
image: jaegertracing/all-in-one
container_name: jaeger
command:
- "--memory.max-traces"
- "10000"
- "--query.base-path"
- "/jaeger/ui"
- "--prometheus.server-url"
- "http://${PROMETHEUS_ADDR}"
deploy:
resources:
limits:
memory: 300M
restart: unless-stopped
ports:
- "${JAEGER_SERVICE_PORT}:${JAEGER_SERVICE_PORT}" # Jaeger UI
- "4317" # OTLP gRPC default port
environment:
- COLLECTOR_OTLP_ENABLED=true
- METRICS_STORAGE_TYPE=prometheus
logging: *logging
# Grafana
grafana:
image: grafana/grafana:9.5.7
container_name: grafana
deploy:
resources:
limits:
memory: 100M
volumes:
- ./src/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./src/grafana/provisioning/:/etc/grafana/provisioning/
ports:
- "${GRAFANA_SERVICE_PORT}:${GRAFANA_SERVICE_PORT}"
logging: *logging
# OpenTelemetry Collector
otelcol:
image: otel/opentelemetry-collector-contrib:0.82.0
container_name: otel-col
deploy:
resources:
limits:
memory: 125M
restart: unless-stopped
# New Relic
# command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-newrelic.yml" ]
# Dynatrace
# command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-dynatrace.yml" ]
# Datadog
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-datadog.yml" ]
volumes:
- ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml
- ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml
- ./src/otelcollector/otelcol-config-newrelic.yml:/etc/otelcol-config-newrelic.yml
- ./src/otelcollector/otelcol-config-dynatrace.yml:/etc/otelcol-config-dynatrace.yml
- ./src/otelcollector/otelcol-config-datadog.yml:/etc/otelcol-config-datadog.yml
ports:
- "4317:4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
depends_on:
- jaeger
logging: *logging
environment:
- NEW_RELIC_OTLP_ENDPOINT=${NEW_RELIC_OTLP_ENDPOINT}
- NEW_RELIC_LICENSE_KEY=${NEW_RELIC_LICENSE_KEY}
- DYNATRACE_OTLP_ENDPOINT=${DYNATRACE_OTLP_ENDPOINT}
- DYNATRACE_API_TOKEN=${DYNATRACE_API_TOKEN}
- DATADOG_API_KEY=${DATADOG_API_KEY}
- DATADOG_SITE=${DATADOG_SITE}
# Prometheus
prometheus:
image: quay.io/prometheus/prometheus:v2.46.0
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --config.file=/etc/prometheus/prometheus-config.yaml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
- --enable-feature=exemplar-storage
volumes:
- ./src/prometheus/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
deploy:
resources:
limits:
memory: 300M
ports:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
logging: *logging