From 4336309d74fef7a98c717886c4d9db2c9130d3cd Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Tue, 19 Sep 2023 17:17:47 -0600 Subject: [PATCH] fix: Fixing tracetest configuration (#65) * fix: Fixing tracetest configuration * fix: Fixing tracetest configuration Signed-off-by: Oscar Reyes --------- Signed-off-by: Oscar Reyes --- docker-compose.yml | 83 +++++++++++++++++----- test/tracetesting/tracetest-provision.yaml | 2 +- 2 files changed, 66 insertions(+), 19 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8d013effb7..bf4cb49988 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 -version: '3.9' +version: "3.9" x-default-logging: &logging driver: "json-file" options: @@ -176,7 +176,7 @@ services: environment: - CURRENCY_SERVICE_PORT - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME + - OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME depends_on: otelcol: condition: service_started @@ -223,8 +223,8 @@ services: memory: 175M restart: unless-stopped ports: - - "${FEATURE_FLAG_SERVICE_PORT}:${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI - - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API + - "${FEATURE_FLAG_SERVICE_PORT}:${FEATURE_FLAG_SERVICE_PORT}" # Feature Flag Service UI + - "${FEATURE_FLAG_GRPC_SERVICE_PORT}" # Feature Flag Service gRPC API environment: - FEATURE_FLAG_SERVICE_PORT - FEATURE_FLAG_GRPC_SERVICE_PORT @@ -233,7 +233,15 @@ services: - OTEL_SERVICE_NAME=featureflagservice - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs healthcheck: - test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] + test: + [ + "CMD", + "curl", + "-H", + "baggage: synthetic_request=true", + "-f", + "http://localhost:${FEATURE_FLAG_SERVICE_PORT}", + ] depends_on: ffs_postgres: condition: service_healthy @@ -490,7 +498,7 @@ services: deploy: resources: limits: - memory: 500M # This is high to enable supporting the recommendationCache feature flag use case + memory: 500M # This is high to enable supporting the recommendationCache feature flag use case restart: unless-stopped ports: - "${RECOMMENDATION_SERVICE_PORT}" @@ -640,7 +648,6 @@ services: - "${REDIS_PORT}" logging: *logging - # ******************** # Telemetry Components # ******************** @@ -671,8 +678,8 @@ services: memory: 300M restart: unless-stopped ports: - - "${JAEGER_SERVICE_PORT}" # Jaeger UI - - "4317" # OTLP gRPC default port + - "${JAEGER_SERVICE_PORT}" # Jaeger UI + - "4317" # OTLP gRPC default port - "14269:14269" - "14268:14268" - "14267:14267" @@ -692,6 +699,33 @@ services: logging: *logging + jaeger-query: + image: jaegertracing/jaeger-query:latest + container_name: jaeger-query + command: + - "--metrics-backend=prometheus" + - "--es.server-urls=https://opensearch-node1:9200" + - "--es.tls.enabled=true" + deploy: + resources: + limits: + memory: 300M + restart: unless-stopped + ports: + - 16685 + environment: + - COLLECTOR_OTLP_ENABLED=true + - METRICS_STORAGE_TYPE=prometheus + - SPAN_STORAGE_TYPE=opensearch + - ES_TAGS_AS_FIELDS_ALL=true + - ES_USERNAME=admin + - ES_PASSWORD=admin + - ES_TLS_SKIP_HOST_VERIFY=true + depends_on: + - opensearch-node1 + - opensearch-node2 + logging: *logging + jaeger-agent: image: jaegertracing/jaeger-agent:latest container_name: jaeger-agent @@ -733,19 +767,25 @@ services: limits: memory: 125M restart: unless-stopped - command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ] + command: + [ + "--config=/etc/otelcol-config.yml", + "--config=/etc/otelcol-observability.yml", + "--config=/etc/otelcol-config-extras.yml", + ] volumes: - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - ./src/otelcollector/otelcol-observability.yml:/etc/otelcol-observability.yml - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - - "4317" # OTLP over gRPC receiver - - "4318:4318" # OTLP over HTTP receiver - - "13133:13133" # health check port - - "9464" # Prometheus exporter - - "8888" # metrics endpoint + - "4317" # OTLP over gRPC receiver + - "4318:4318" # OTLP over HTTP receiver + - "13133:13133" # health check port + - "9464" # Prometheus exporter + - "8888" # metrics endpoint depends_on: - jaeger-agent + - jaeger-query - data-prepper logging: *logging @@ -793,7 +833,14 @@ services: volumes: - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container healthcheck: - test: ["CMD", "curl", "-f", "https://opensearch-node1:9200/_cluster/health?wait_for_status=yellow", "-ku admin:admin"] + test: + [ + "CMD", + "curl", + "-f", + "https://opensearch-node1:9200/_cluster/health?wait_for_status=yellow", + "-ku admin:admin", + ] interval: 5s timeout: 25s retries: 4 @@ -837,7 +884,7 @@ services: - opensearch-node2 - prometheus -# Observability OSD Integrations + # Observability OSD Integrations integrations: container_name: opensearch-integrations build: @@ -976,7 +1023,7 @@ services: otelcol: condition: service_started healthcheck: - test: [ "CMD", "wget", "--spider", "localhost:11633" ] + test: ["CMD", "wget", "--spider", "localhost:11633"] interval: 1s timeout: 3s retries: 60 diff --git a/test/tracetesting/tracetest-provision.yaml b/test/tracetesting/tracetest-provision.yaml index 7abc02c260..5910e66468 100644 --- a/test/tracetesting/tracetest-provision.yaml +++ b/test/tracetesting/tracetest-provision.yaml @@ -26,6 +26,6 @@ spec: name: Jaeger type: jaeger jaeger: - endpoint: jaeger:16685 + endpoint: jaeger-query:16685 tls: insecure: true