Skip to content

otel-demo: upgrade Docker Compose deployment to 3.0.0 - #434

Open
kylehounslow wants to merge 6 commits into
opensearch-project:mainfrom
kylehounslow:feat/otel-demo-3.0
Open

otel-demo: upgrade Docker Compose deployment to 3.0.0#434
kylehounslow wants to merge 6 commits into
opensearch-project:mainfrom
kylehounslow:feat/otel-demo-3.0

Conversation

@kylehounslow

@kylehounslow kylehounslow commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Upgrade the OpenTelemetry Demo to 3.0.0 for the Docker Compose deployment.

  • Bump IMAGE_VERSION/DEMO_VERSION to 3.0.0 and the flagd/postgres/valkey pins to the 3.0 set.
  • Rewrite docker-compose.otel-demo.yml to the 3.0 core service set: drop accounting, fraud-detection, kafka, llm, product-reviews; add telemetry-docs; adopt the upstream 3.0 healthchecks, k6 load generator, and per-service service.criticality resource attributes. Preserve stack customizations (network/logging anchors, container names, memory limits, restart policy, telemetry pointed at the stack collector, image refs, port publishing, and the local-backends alerting-init service).
  • Replace the Locust load-generator env with k6 (LOAD_GENERATOR_VUS, K6_TARGET_URL).
  • Rename postgresql to astronomy-db; init.sql now provisions astronomy_db with astronomy_user/monitoring_user.
  • Mount the new product-catalog/otel-config.yml; refresh demo.flagd.json to the 3.0 flag set.
  • Update the vendored astronomy dashboards and otel-demo alert rules for the 3.0 service set: remove the product-reviews panels, drop fraud-detection/product-reviews from the service-telemetry variable list, repoint the product-catalog throughput panel to db_client_operation_duration_seconds_count, repoint the Avg amount charged panel from the payment-service log attribute request.amount.units.low (gone in 3.0) to the grpc.oteldemo.PaymentService/Charge span attribute demo.payment.amount, and drop product-reviews/accounting from the alert-rule matchers.
  • Add the frontend-proxy backend env vars (CHATBOT_*, FIREPIT_*, OPAMP_SERVER_*) so the 3.0 envoy bootstrap does not crash-loop when those services are absent.

Validation: brought up the 3.0.0 demo via Docker Compose in an isolated project. All core demo services plus the stack collector reached healthy; traces, metrics, and logs flowed to the collector under k6 load. astronomy-db ran init.sql (astronomy_db, roles, seeded product catalog), flagd loaded the 3.0 flag set, and the alert rules parse with product-reviews/accounting dropped.

Scope: Docker Compose only. Kubernetes/Helm and AWS CDK/CLI are tracked in the linked issue. The frontend-proxy env-var requirement applies to those modes too and is documented there.

Issues Resolved

Part of #433 (this PR covers the Docker Compose scope only).

Testing

Ran stack locally and validated otel-demo metrics. See screenshots in comment below. #434 (comment)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kylehounslow

Copy link
Copy Markdown
Collaborator Author

Still pending: Validate the Astronomy Shop dashboard renders fully in opensearch-dashboards. Will post screenshots once completed

Bump IMAGE_VERSION and DEMO_VERSION to 3.0.0. Replace Locust load-generator
env with k6 (LOAD_GENERATOR_VUS, K6_TARGET_URL). Remove env for services not
in the 3.0 core demo (product-reviews, kafka, llm). Rename postgresql service
to astronomy-db with astronomy_user/monitoring_user scheme; add
AD_PROMETHEUS_PORT, OTEL_SERVICE_NAMESPACE, TELEMETRY_DOCS_*, FRONTEND_PROXY_ADDR.
Bump flagd/postgres/valkey image pins to the 3.0 set.

Rewrite docker-compose.otel-demo.yml to the 3.0.0 core services: drop
accounting, fraud-detection, kafka, llm, product-reviews; add telemetry-docs;
adopt upstream 3.0 healthchecks, k6 load-generator, and per-service
service.criticality resource attributes. Preserve stack customizations:
network/logging anchors, container names, memory limits, restart policy,
telemetry pointed at the stack collector, image refs, unbound port publishing,
and the local-backends alerting-init service.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Update demo.flagd.json and postgresql/init.sql to 3.0.0. init.sql now
provisions astronomy_db with astronomy_user and monitoring_user; flags for
removed services drop out. Add product-catalog otel-config.yml mounted by the
product-catalog service in 3.0.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Remove the product-reviews panels from the astronomy-shop dashboard and drop
fraud-detection and product-reviews from the service-telemetry dashboard
variable list. Repoint the product catalog throughput panel from the removed
npgsql (.NET) counters to the Go client metric
db_client_operation_duration_seconds_count. Drop product-reviews and
accounting from the otel-demo alert rule service matchers.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Keep this PR scoped to docker-compose. The charts/observability-stack/files
copies of the astronomy dashboards and otel-demo alert rules feed the Helm
init-dashboards and cortex-rules configmaps, but the opentelemetry-demo
subchart is still pinned at 0.40.8. Shipping 3.0-service-set dashboards and
alerts into the chart ahead of the subchart bump leaves the Helm path
half-updated (astronomy-db and dropped-service references against a pre-3.0
deployment). These belong with the helm 3.0 follow-up that also bumps the
subchart.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
The 3.0.0 frontend-proxy image's envoy bootstrap defines STRICT_DNS
clusters for CHATBOT_HOST/PORT, FIREPIT_HOST/PORT and
OPAMP_SERVER_HOST/UI_PORT. This stack does not run those services;
without the vars the socket addresses are empty, proto validation
fails, and the proxy crash-loops, which also blocks load-generator
(depends on frontend-proxy healthy). Add the vars to .env with the
upstream 3.0.0 defaults and pass them into the frontend-proxy
container. The hosts do not resolve here, so the clusters stay
unhealthy at runtime without blocking startup, matching the existing
grafana/jaeger handling.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
@kylehounslow

Copy link
Copy Markdown
Collaborator Author

Screenshots

Astronomy Shop

astronomy-shop-full

Astronomy Shop - service telemetry

service-telemetry-top service-telemetry-middle service-telemetry-bottom

The Astronomy Shop dashboard's 'Avg amount charged' panel averaged
attributes.request.amount.units.low on payment-service logs. In
otel-demo 3.0 the payment service logs 'Charge request received.' with
no amount attribute, so the field is UNDEFINED and the panel fails with
'Aggregation function AVG expects field type {[INTEGER]|[DOUBLE]}, but
got [UNDEFINED]'. The charge amount now lives on the
grpc.oteldemo.PaymentService/Charge span as attributes.demo.payment.amount.
Repoint the panel to otel-v1-apm-span*, cast the amount to double, and
bucket by endTime.

Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
@kylehounslow

Copy link
Copy Markdown
Collaborator Author

@ps48 you're the best person for review here. Please take a look when you get the chance. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant