otel-demo: upgrade Docker Compose deployment to 3.0.0 - #434
Conversation
|
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>
54ad126 to
e70c506
Compare
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>
61804f3 to
2cd540b
Compare
|
@ps48 you're the best person for review here. Please take a look when you get the chance. Thanks! |
There was a problem hiding this comment.
Reviewed the Docker Compose otel-demo 3.0.0 upgrade for stack bring-up only (not the demo app code), against a local checkout of this branch.
docker compose config renders all 43 services with no warnings; Prometheus alert rules pass promtool, flagd/dashboards/init.sql are valid, the image pins are real, and there are no dangling references to the dropped services (kafka, product-reviews, llm, accounting, fraud-detection) or dependency cycles.
Minor / non-blocking notes
- Alert-rules copy drift (info): only the Docker-Compose copy of
otel-demo-alerts.ymlwas updated. The Helm chart copy (charts/observability-stack/files/rules-otel-demo/otel-demo-alerts.yml) still matches on the removedproduct-reviews/accounting/fraud-detection. This is consistent with the stated Docker-Compose-only scope (Helm tracked separately), but the two copies have now diverged — might be worth a one-line note so it isn't missed. monitoring_useris unused in this scope (minor):init.sqlprovisions it (withpg_monitor) and.envdefinesPOSTGRES_MONITORING_PASSWORD, but nothing in the Compose stack scrapes Postgres, so it's currently dead config here (mirrors upstream — presumably for a future Postgres receiver).- Nit: the trailing
# defined in …comments on thePOSTGRES_*_PASSWORDlines in.envare harmless under Compose v2 (verified stripped during interpolation), but would leak into the value if that file were eversourced by a shell or consumed viaenv_file:. Moving the note to its own line above would be more robust.
Added on review — two docs made stale by this upgrade (in-scope)
A. Broken access point: the /loadgen/ "Load generator UI" (higher priority).
This branch carries otel-demo.mdx (stacked on #432), whose access-points table lists:
| http://localhost:8080/loadgen/ | Load generator UI |
The Locust → k6 migration in this PR makes that a dead link: k6 is headless, the load-generator service publishes no port, and frontend-proxy no longer has a /loadgen/ route (LOCUST_WEB_HOST/LOCUST_WEB_PORT are gone). Opening it yields a proxy error / 404. Since this PR is what invalidates the row, drop it (and any "Load generator UI" prose) here. The /feature row stays valid — flagd-ui is still present.
B. Stale memory breakdown in README.md (~L388–391).
The "OpenTelemetry Demo adds (~1.9 GB total)" list still enumerates services this PR removes:
Kafka: ~500 MB— kafka is dropped in 3.0Java services (fraud-detection, ad, accounting): ~540 MB— onlyadremains
So the ~1.9 GB / ~3.0 GB combined figures are overstated and the list is wrong. Update to the 3.0 core set (and note k6 replaced Locust).




Description
Upgrade the OpenTelemetry Demo to 3.0.0 for the Docker Compose deployment.
IMAGE_VERSION/DEMO_VERSIONto 3.0.0 and the flagd/postgres/valkey pins to the 3.0 set.docker-compose.otel-demo.ymlto the 3.0 core service set: dropaccounting,fraud-detection,kafka,llm,product-reviews; addtelemetry-docs; adopt the upstream 3.0 healthchecks, k6 load generator, and per-serviceservice.criticalityresource 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).LOAD_GENERATOR_VUS,K6_TARGET_URL).postgresqltoastronomy-db;init.sqlnow provisionsastronomy_dbwithastronomy_user/monitoring_user.product-catalog/otel-config.yml; refreshdemo.flagd.jsonto the 3.0 flag set.product-reviewspanels, dropfraud-detection/product-reviewsfrom the service-telemetry variable list, repoint the product-catalog throughput panel todb_client_operation_duration_seconds_count, repoint theAvg amount chargedpanel from the payment-service log attributerequest.amount.units.low(gone in 3.0) to thegrpc.oteldemo.PaymentService/Chargespan attributedemo.payment.amount, and dropproduct-reviews/accountingfrom the alert-rule matchers.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-dbraninit.sql(astronomy_db, roles, seeded product catalog), flagd loaded the 3.0 flag set, and the alert rules parse withproduct-reviews/accountingdropped.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.