Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
🐳 Add tracing demo support for Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
TilBlechschmidt committed May 12, 2021
1 parent a344879 commit 1889a0c
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 9 deletions.
18 changes: 9 additions & 9 deletions distribution/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-proxy
command: proxy --log debug,hyper=warn
command: proxy --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317
ports:
- 8080:40005
depends_on:
Expand All @@ -13,14 +13,14 @@ services:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-manager
command: manager example-manager webgrid-manager --log debug,hyper=warn
command: manager example-manager webgrid-manager --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317
depends_on:
- redis
orchestrator:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-orchestrator
command: orchestrator --slot-count 5 example-orchestrator docker --images "${REPOSITORY:-webgrid}/node-firefox:${IMAGE_TAG:-latest}=firefox::68.7.0esr,${REPOSITORY:-webgrid}/node-chrome:${IMAGE_TAG:-latest}=chrome::81.0.4044.122" --log debug,hyper=warn
command: orchestrator --slot-count 5 example-orchestrator docker --images "${REPOSITORY:-webgrid}/node-firefox:${IMAGE_TAG:-latest}=firefox::68.7.0esr,${REPOSITORY:-webgrid}/node-chrome:${IMAGE_TAG:-latest}=chrome::81.0.4044.122" --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317 ${ORCHESTRATOR_FLAGS:-}
depends_on:
- redis
volumes:
Expand All @@ -29,7 +29,7 @@ services:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-storage
command: storage --log debug,hyper=warn --host webgrid-storage --storage-directory /storage --size-limit 10
command: storage --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317 --host webgrid-storage --storage-directory /storage --size-limit 10
depends_on:
- redis
volumes:
Expand All @@ -38,20 +38,20 @@ services:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-gc
command: gc --log debug
command: gc --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317
depends_on:
- redis
api:
image: ${REPOSITORY:-webgrid}/core:${IMAGE_TAG:-latest}
platform: linux/amd64
container_name: webgrid-api
command: api --log debug,hyper=warn --host webgrid-api
command: api --log debug,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn --trace-endpoint http://webgrid-otelcol:4317 --host webgrid-api
depends_on:
- redis
redis:
image: redis:6.2-alpine
container_name: webgrid-redis
command: redis-server --notify-keyspace-events Kgx
command: redis-server --notify-keyspace-events Kgx --save "" --appendonly no
ports:
- 6379:6379
volumes:
Expand All @@ -60,5 +60,5 @@ volumes:

networks:
default:
external:
name: webgrid
external: true
name: webgrid
35 changes: 35 additions & 0 deletions test/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
receivers:
otlp:
protocols:
http:
grpc:

exporters:
logging:
loglevel: debug

jaeger:
endpoint: jaeger-all-in-one:14250
insecure: true

processors:
batch:

extensions:
health_check:
pprof:
endpoint: :1888
zpages:
endpoint: :55679

service:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging, jaeger]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging]
31 changes: 31 additions & 0 deletions test/tracing-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: "2"
services:
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
container_name: webgrid-jaeger
ports:
- "16686:16686"
- "14268"
- "14250"

# Collector
otel-collector:
image: otel/opentelemetry-collector-dev:latest
container_name: webgrid-otelcol
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "1888:1888" # pprof extension
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55681:55681" # OTLP HTTP receiver
- "55670:55679" # zpages extension
depends_on:
- jaeger-all-in-one

networks:
default:
external:
name: webgrid

0 comments on commit 1889a0c

Please sign in to comment.