forked from mtusi2026/mtusi2026lab6
feat(otel): lab6 route OTLP signals through the Collector
This commit is contained in:
@@ -171,6 +171,9 @@ services:
|
||||
image: mtusi-messenger-api:lab3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_METRIC_EXPORT_INTERVAL: "${OTEL_METRIC_EXPORT_INTERVAL:-15000}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
APP_HOST: "0.0.0.0"
|
||||
APP_PORT: "8080"
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
@@ -234,6 +237,9 @@ services:
|
||||
command: ["/worker"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_METRIC_EXPORT_INTERVAL: "${OTEL_METRIC_EXPORT_INTERVAL:-15000}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
S3_ENDPOINT: "http://minio:9000"
|
||||
S3_BUCKET: "${S3_BUCKET:-messenger-attachments}"
|
||||
@@ -273,6 +279,9 @@ services:
|
||||
command: ["/reconciler"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4318}"
|
||||
OTEL_METRIC_EXPORT_INTERVAL: "${OTEL_METRIC_EXPORT_INTERVAL:-15000}"
|
||||
OTEL_SDK_DISABLED: "${OTEL_SDK_DISABLED:-false}"
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
S3_ENDPOINT: "http://minio:9000"
|
||||
S3_BUCKET: "${S3_BUCKET:-messenger-attachments}"
|
||||
@@ -365,6 +374,18 @@ services:
|
||||
networks:
|
||||
- internal
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.135.0
|
||||
restart: unless-stopped
|
||||
command: ["--config=/etc/otelcol-contrib/config.yaml"]
|
||||
volumes:
|
||||
- ./infra/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
|
||||
depends_on:
|
||||
- jaeger
|
||||
- opensearch
|
||||
networks:
|
||||
- internal
|
||||
|
||||
secrets:
|
||||
postgres_password:
|
||||
file: ./secrets/postgres_password
|
||||
|
||||
Reference in New Issue
Block a user