Skip to content

Commit

Permalink
gateway: add opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
ElysaSrc committed Dec 14, 2023
1 parent 3afe9e4 commit 688f0c8
Show file tree
Hide file tree
Showing 12 changed files with 634 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ jobs:
export TAG='${{ needs.build.outputs.stable_version }}'
services='editoast core front gateway'
docker compose pull $services
docker compose up --no-build -d $services
docker compose up --no-build -d $services jaeger
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ services:
restart: unless-stopped
ports: ["4000:4000"]

jaeger:
image: jaegertracing/all-in-one:latest
container_name: osrd-jaeger
restart: unless-stopped
ports:
- "4317:4317"
- "16686:16686"

wait-healthy:
depends_on:
editoast: {condition: service_healthy}
Expand Down
4 changes: 4 additions & 0 deletions docker/docker-compose.host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ services:
volumes:
- "./docker/gateway.dev.host.toml:/gateway.toml"

jaeger:
ports: []
network_mode: host

wait-healthy:
depends_on:
editoast: {condition: service_healthy}
Expand Down
6 changes: 6 additions & 0 deletions docker/gateway.dev.host.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ secret_key = "NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECR

listen_addr = "0.0.0.0"

[telemetry.tracing]
type = "OpenTelemetry"
endpoint = "http://localhost:4317"

[[targets]]
tracing_name = "editoast"
prefix = "/api"
upstream = "http://localhost:8090"
require_auth = true

[[targets]]
tracing_name = "front"
upstream = "http://localhost:3000"
require_auth = false

Expand Down
6 changes: 6 additions & 0 deletions docker/gateway.dev.simple.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ secret_key = "NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECRET++NOT+A+SECR

listen_addr = "0.0.0.0"

[telemetry.tracing]
type = "OpenTelemetry"
endpoint = "http://osrd-jaeger:4317"

[[targets]]
tracing_name = "editoast"
prefix = "/api"
upstream = "http://osrd-editoast:80"
require_auth = true

[[targets]]
tracing_name = "front"
upstream = "http://osrd-front:3000"
require_auth = false

Expand Down
Loading

0 comments on commit 688f0c8

Please sign in to comment.