Skip to content

Commit

Permalink
chore: handle namespace is not specified in docker v26
Browse files Browse the repository at this point in the history
  • Loading branch information
mrasu committed Mar 23, 2024
1 parent eb57263 commit 145a49e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions create-echoed/template/base/example/opentelemetry-demo/.env
Expand Up @@ -17,6 +17,9 @@ PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/tra

# OpenTelemetry Resource Definitions
OTEL_RESOURCE_ATTRIBUTES="service.namespace=opentelemetry-demo"
# temporary environment variable for OTEL_RESOURCE_ATTRIBUTES because docker cli overrides OTEL_RESOURCE_ATTRIBUTES
# c.f. https://github.com/docker/cli/issues/4958
OTEL_RESOURCE_ATTRIBUTES_TMP="service.namespace=opentelemetry-demo"

# Metrics Temporality
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
Expand Down
Expand Up @@ -38,7 +38,7 @@ services:
- AD_SERVICE_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_LOGS_EXPORTER=otlp
- OTEL_SERVICE_NAME=adservice
depends_on:
Expand Down Expand Up @@ -66,7 +66,7 @@ services:
- CART_SERVICE_PORT
- REDIS_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=cartservice
- ASPNETCORE_URLS=http://*:${CART_SERVICE_PORT}
depends_on:
Expand Down Expand Up @@ -102,7 +102,7 @@ services:
- SHIPPING_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=checkoutservice
depends_on:
cartservice:
Expand Down Expand Up @@ -142,7 +142,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_TMP},service.name=currencyservice # The C++ SDK does not support OTEL_SERVICE_NAME
depends_on:
otelcol:
condition: service_started
Expand All @@ -167,7 +167,7 @@ services:
- APP_ENV=production
- EMAIL_SERVICE_PORT
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318/v1/traces
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=emailservice
depends_on:
otelcol:
Expand Down Expand Up @@ -201,7 +201,7 @@ services:
- RECOMMENDATION_SERVICE_ADDR
- SHIPPING_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES}
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- ENV_PLATFORM
- OTEL_SERVICE_NAME=frontend
- PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
Expand Down Expand Up @@ -281,7 +281,7 @@ services:
- PAYMENT_SERVICE_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=paymentservice
depends_on:
otelcol:
Expand All @@ -308,7 +308,7 @@ services:
- PRODUCT_CATALOG_SERVICE_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
otelcol:
Expand All @@ -335,7 +335,7 @@ services:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4318
- OTEL_PHP_AUTOLOAD_ENABLED=true
- QUOTE_SERVICE_PORT
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=quoteservice
- OTEL_PHP_INTERNAL_METRICS_ENABLED=true
depends_on:
Expand Down Expand Up @@ -365,7 +365,7 @@ services:
- OTEL_PYTHON_LOG_CORRELATION=true
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=recommendationservice
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
depends_on:
Expand Down Expand Up @@ -395,7 +395,7 @@ services:
- SHIPPING_SERVICE_PORT
- QUOTE_SERVICE_ADDR
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:4317/v1/traces
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES_TMP}
- OTEL_SERVICE_NAME=shippingservice
depends_on:
otelcol:
Expand Down

0 comments on commit 145a49e

Please sign in to comment.