Updated services + Add OpenTelemetry (#6434)

OpenTelemetry now available in dev mode.
 -> run `make run-dev-otel`
As of now backend and datastore report spans.
This commit is contained in:
Emanuel Schütze 2022-06-08 18:46:14 +02:00 committed by GitHub
parent 676be7f1fa
commit e343bb7e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 53 additions and 8 deletions

View File

@ -17,9 +17,15 @@ build-dev:
run-dev: | build-dev run-dev: | build-dev
docker-compose -f docker/docker-compose.dev.yml up $(ARGS) docker-compose -f docker/docker-compose.dev.yml up $(ARGS)
run-dev-otel: | build-dev
docker-compose -f docker/docker-compose.dev.yml -f docker/dc.otel.dev.yml up $(ARGS)
stop-dev: stop-dev:
docker-compose -f docker/docker-compose.dev.yml down --volumes --remove-orphans docker-compose -f docker/docker-compose.dev.yml down --volumes --remove-orphans
stop-dev-otel:
docker-compose -f docker/docker-compose.dev.yml -f docker/dc.otel.dev.yml down --volumes --remove-orphans
copy-node-modules: copy-node-modules:
docker-compose -f docker/docker-compose.dev.yml exec client bash -c "cp -r /app/node_modules/ /app/src/" docker-compose -f docker/docker-compose.dev.yml exec client bash -c "cp -r /app/node_modules/ /app/src/"
mv openslides-client/client/src/node_modules/ openslides-client/client/ mv openslides-client/client/src/node_modules/ openslides-client/client/

13
docker/dc.otel.dev.yml Normal file
View File

@ -0,0 +1,13 @@
version: "3"
services:
collector:
image: otel/opentelemetry-collector:0.41.0
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
jaeger:
image: jaegertracing/all-in-one
ports:
- "16686:16686"

View File

@ -179,6 +179,7 @@ services:
- VOTE_DATABASE_NAME=openslides - VOTE_DATABASE_NAME=openslides
- AUTH=ticket - AUTH=ticket
- AUTH_HOST=auth - AUTH_HOST=auth
- VOTE_DISABLE_LOG=true
volumes: volumes:
- ../openslides-vote-service/cmd:/root/cmd - ../openslides-vote-service/cmd:/root/cmd
- ../openslides-vote-service/internal:/root/internal - ../openslides-vote-service/internal:/root/internal

View File

@ -0,0 +1,21 @@
receivers:
otlp:
protocols:
http:
grpc:
exporters:
jaeger:
endpoint: jaeger:14250
tls:
insecure: true
processors:
batch:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [ jaeger]

View File

@ -43,3 +43,7 @@ VOTE_DATABASE_HOST=postgres
VOTE_DATABASE_USER=openslides VOTE_DATABASE_USER=openslides
VOTE_DATABASE_PASSWORD=openslides VOTE_DATABASE_PASSWORD=openslides
VOTE_DATABASE_NAME=openslides VOTE_DATABASE_NAME=openslides
OTEL_EXPORTER_JAEGER_ENDPOINT=http://jaeger:14268/api/traces
OTEL_EXPORTER_OTLP_ENDPOINT=collector:4318
OPENTELEMETRY_ENABLED=0

@ -1 +1 @@
Subproject commit 9fb65150444a37cb8c7947ec11ab724220b2a138 Subproject commit de856b2d8c9917c7aa43ed56800f4e1db783090d

@ -1 +1 @@
Subproject commit ce6dfdb0eb12717b10c0a074ff10dae1a481a0b9 Subproject commit 80735ba29c0a13aa88fc68634def8cad71cc209a

@ -1 +1 @@
Subproject commit 4b7cb9f057f3dc975a6b53e911d7542a2bdacb88 Subproject commit 23991a05b7ab58bd596d27cb645466f354d97c20

@ -1 +1 @@
Subproject commit 4f3a04b6898243e40bca0d2817dfaaf0f80d3167 Subproject commit 2c4d872bfabf6c9fcc13bb3dfc35abf3bf89a3fd

@ -1 +1 @@
Subproject commit 077ff2140f9d5c29202875e4f1f6321a5eff5630 Subproject commit 6c1bf8bc55469ec96d9d74fea69e0356a11eb9e3

@ -1 +1 @@
Subproject commit cfe20d6bb425645429d9cff78630bfd640a91007 Subproject commit cded5f9bf05786bf85c111c5d5f5157399eb8163