Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions code/chapter09/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
version: '3.8'

services:
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "13000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana-storage:/var/lib/grafana
depends_on:
- prometheus
- loki
- tempo
dns_search: []
networks:
- observability

prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "19090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-storage:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
dns_search: []
networks:
- observability

loki:
image: grafana/loki:latest
container_name: loki
ports:
- "13100:3100"
volumes:
- loki-storage:/loki
dns_search: []
networks:
- observability

tempo:
image: grafana/tempo:latest
container_name: tempo
ports:
- "13200:3200"
- "14317:4317"
- "14318:4318"
volumes:
- tempo-storage:/var/tempo
- ./tempo-config.yaml:/etc/tempo/tempo-config.yaml
command: [ "-config.file=/etc/tempo/tempo-config.yaml" ]
dns_search: []
networks:
- observability

otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector
ports:
- "24317:4317"
- "24318:4318"
- "19411:9411"
volumes:
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
command: [ "--config=/etc/otel-collector-config.yml" ]
depends_on:
- loki
- prometheus
- tempo
dns_search: []
networks:
- observability

volumes:
grafana-storage:
prometheus-storage:
loki-storage:
tempo-storage:

networks:
observability:
driver: bridge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions code/chapter09/otel-collector-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

processors:
batch:
timeout: 10s
send_batch_size: 1024

exporters:
debug:
verbosity: detailed

otlp_grpc/tempo:
endpoint: tempo:4317
tls:
insecure: true

otlp_http/loki:
endpoint: http://loki:3100/otlp
tls:
insecure: true

prometheus:
endpoint: "0.0.0.0:8889"

service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp_grpc/tempo, debug]

metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus, debug]

logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp_http/loki, debug]
Loading
Loading