Repository navigation
refactor(docker): make telemetry env uniform across compose services - #21840
devashish2203 wants to merge 13 commits into
Conversation
Every GMS, MCE and MAE service now carries the telemetry and usage aggregation keys (quickstart values on quickstart services, dev values on debug services), and every debug system-update service reads the debug variant layer. Three containers change: - datahub-mae-consumer-quickstart-consumers and -consumers-cdc gain the quickstart values (now in env/docker/mae-consumer.env). - system-update-debug-postgres-cdc gains the dev values from env/docker/variants/debug/system-update.env. MAE's DATAHUB_SERVER_TYPE moves to environment:, as for GMS and MCE, because its default differs between quickstart and debug. The unused quickstart telemetry anchor and the MAE debug variant file are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryOverview Telemetry keys (
Rendered compose changes are limited to three containers (two postgres quickstart MAE services and that system-update debug CDC service); quickstart CLI output is unchanged. A comment in Reviewed by Cursor Bugbot for commit a01db8e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Smart test selectionpytest smoke testsMode: active. Only the selection below runs for the pytest smoke tests on this PR (applied:
Medium confidence: a wrong tag means tests are skipped, so check the tags above against what this PR touches. Selected scopes (25 files or classes, 87 tests)
Add the Playwright E2E testsThis run:
Add the commit |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
# Conflicts: # docker/profiles/docker-compose.gms.yml # env/docker/mae-consumer.env
Builds on #21839.
What
Makes the telemetry env (
DATAHUB_SERVER_TYPE,DATAHUB_TELEMETRY_ENABLED,USAGE_AGGREGATION_ENABLED,USAGE_AGGREGATION_FLUSH_INTERVAL_SECONDS,USAGE_AGGREGATION_ALIGNMENT_PERIOD_SECONDS,USAGE_AGGREGATION_INCLUDE_AGENT_NAME) uniform across the Docker compose services.Rule:
DATAHUB_SERVER_TYPE=quickstart), debug services the dev values (DATAHUB_SERVER_TYPE=dev).env/docker/variants/debug/system-update.envalready states. Quickstart system-update services keep none.Changes:
env/docker/mae-consumer.env: adds the telemetry and usage-aggregation keys as${KEY:-default}opt-ins, the same values asenv/docker/mce-consumer.env.env/docker/variants/debug/mae-consumer.env: deleted (it held only these keys), and its slot removed from the two debug MAEenv_filelists.DATAHUB_SERVER_TYPElives inenvironment:(quickstartin the base anchor,devin the dev anchor, explicit on the two postgres quickstart services), as for GMS and MCE: a later env file's${KEY:-default}resolves against the value an earlier file set, so a variant file cannot change this default.system-update-debug-postgres-cdcuses the postgres debugenv_filelist, like the other debug system-update services.x-datahub-quickstart-telemetry-envanchor is removed.Effect on rendered compose (container x key, old -> new)
Three containers change, six keys each; nothing else changes.
DATAHUB_SERVER_TYPEDATAHUB_TELEMETRY_ENABLEDUSAGE_AGGREGATION_ENABLED..._FLUSH_INTERVAL_SECONDS..._ALIGNMENT_PERIOD_SECONDS..._INCLUDE_AGENT_NAMEdatahub-mae-consumer-quickstart-consumersquickstart-consumersquickstarttruetrue303600truequickstart,allImages; AI smoke leg (both providers)quickstartfalsetrue303600truesmoke-test/run-quickstart.shquickstartfalsetrue53600truedatahub-mae-consumer-quickstart-consumers-cdcquickstart-consumers-cdcquickstarttruetrue303600truequickstartCDCquickstartfalsetrue303600truesystem-update-debug-postgres-cdcdebug-postgres-cdcdevtruetrue303600truequickstartPgCdcDebugdevfalsetrue303600trueRuntime effect
DATAHUB_TELEMETRY_ENABLEDmeans the application default (telemetry.enabledServer: true). Gradle, smoke and the AI leg now passfalseto these containers; thedocker/build.gradlevalue and therun-quickstart.shvalue still win.ScheduledAnalyticsFactoryand does not scan the telemetry or usage-aggregation factory packages, so none of the six keys changes its behaviour.ScheduledAnalyticsFactory(the daily report); it buildsTrackingService, but nothing indatahub-upgradecalls it.system-update-debug-postgres-cdcnow creates the usage-aggregation beans (USAGE_AGGREGATION_ENABLED=true) and reports server typedevinstead of the defaultprod, the same as every other debug system-update service. This is local Micrometer export only.DATAHUB_SERVER_TYPEon debug services moves from an env file toenvironment:, so under plain compose an ad-hoc or job env file can no longer override it there (Gradle still can, through interpolation). GMS and MCE already behave this way; no env file sets it today.The runtime effect was checked by reading the code (component scans and callers), not on a running stack.
CLI quickstart
./gradlew :docker:generateQuickstartComposeConfigleavesdocker/quickstart/unchanged: released-CLI users see no change.Still inline in
smoke-test/run-quickstart.shDATAHUB_TELEMETRY_ENABLED=false: the shell value reaches every service that names the key. Asmoke:<config>label can pick a debug profile, where it reaches the debug system-update services. The smoke job folder could only match that by also giving every quickstart system-update service the key, which is a further value change. Only the comment is updated.KAFKA_LISTENER_CONCURRENCY=3: the two postgres quickstart MAE services and two MCE services still do not name the key.USAGE_AGGREGATION_FLUSH_INTERVAL_SECONDSexport: GMS reads30fromenv/common/gms.envbefore the job layer, so the job layer's default cannot take effect.Verification
debug-consumersservices show no change../gradlew :docker:generateQuickstartComposeConfig: no change.python3 smoke-test/check_env_parity.py: passes.shellcheck smoke-test/run-quickstart.sh: no warnings (one pre-existing info note).Checklist
🤖 Generated with Claude Code
Summary by cubic
Standardizes the telemetry and usage-aggregation environment variables across the Docker compose GMS, MCE, and MAE services, and aligns the debug system-update services. Previously MAE consumers carried none of these keys and
system-update-debug-postgres-cdcmissed the debug telemetry, so they could report the wrong server type or skip usage exports.env/docker/mae-consumer.env; theirDATAHUB_SERVER_TYPEmoves to composeenvironment:because its quickstart/debug default differs.system-update-debug-postgres-cdcnow uses the debug env list, so it enables usage aggregation and reportsDATAHUB_SERVER_TYPE=dev.system-update-debug-postgres-cdccreating usage-aggregation beans and reportingdevinstead ofprod.DATAHUB_TELEMETRY_ENABLED=false, so telemetry is never turned on.DATAHUB_SERVER_TYPEmoves from an env file toenvironment:, so an ad-hoc env file can no longer override it.Written for commit 624f402. Summary will update on new commits.