fix(deploy): forward three-axis SDK env vars into fake-exporter container - #194
Merged
Merged
Conversation
…iner base.yml was hard-coding EXPORTER_RATE=1000 and ignoring the new EXPORTER_SDK_* knobs introduced in PR #190. Smoke-testing run-three-axis-sweep.sh (#193) produced suspiciously-low producer_bytes_out_per_s values because every cell of the sweep was silently running the SDK at its defaults (window=15s, agg=default, projection="") instead of the swept values. Switches the fake-exporter container's environment block to `${VAR:-default}` interpolation for every sweep-relevant knob so the sweep driver's env assignments actually reach the container: EXPORTER_FREQ_HZ EXPORTER_SDK_WINDOW EXPORTER_SDK_PROJECTION EXPORTER_SDK_AGG EXPORTER_MAX_BUFFER_PER_SERIES Legacy EXPORTER_RATE is kept but drops to empty by default so the deprecation warning doesn't fire spuriously. Before/after on the same cell (W=5s, card=50, freq=5, agg=raw-buffer, no gzip, 60s soak): before after sdk config logged default/15s raw-buffer/5s producer_bytes_out 1923 B/s 48546 B/s (×25) gateway_points_per_s 3.18 280.4 backend_samples_per_s 2.91 247.9 48 KB/s matches the naive estimate (50 card × 5 Hz × 2 instruments × ~80 B/datapoint ≈ 40 KB/s), confirming AggregationRawBuffer is emitting the expected per-event stream. Before the fix, the SDK was running Sum aggregation on the Counter instead — one data point per attribute set per 15s tick = ~7 pts/s, which matches the low gateway rate seen. Also adds `deploy/fake-exporter/sdk_emit_test.go` as a regression test for the aggregator contract: a ManualReader + AggregationRawBuffer should emit exactly `cardinality × instruments × samples_each` data points. This is the counterpart of the unit test in opentelemetry-go-patch/sdk/metric/internal/aggregate/ but runs at the MeterProvider+View level, catching wiring mistakes like the one above. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root-cause fix for the suspiciously-low
producer_bytes_out_per_svalues I saw smoke-testing #193.base.ymlwas hard-codingEXPORTER_RATE=1000and ignoring the newEXPORTER_SDK_*knobs from #190 — every cell of the sweep was silently running the SDK at its defaults (window=15s, agg=default, projection="") regardless of what the driver set in env.Fix: switch the fake-exporter container's env block to
\${VAR:-default}interpolation so sweep-time host env actually reaches the container.Before / after (same cell: W=5s, card=50, freq=5, agg=raw-buffer, no gzip, 60s soak)
48 KB/s matches the naive estimate (50 card × 5 Hz × 2 instruments × ~80 B/datapoint ≈ 40 KB/s). Before the fix the SDK was running
Sumon the Counter instead — one data point per attribute set per 15s tick ≈ 7 pts/s, matching the low gateway rate.Also adds a regression test
deploy/fake-exporter/sdk_emit_test.goruns aManualReader+AggregationRawBufferpipeline the same waymain.godoes, and asserts the data-point count equalscardinality × instruments × samples_each. This catches wiring-level mistakes (wrong Aggregation type reaching the SDK) that unit tests inside the aggregator package can't.Test result:
Unblocks
The §6.2 a/b/c sub-sweeps can now run cleanly. Each one is ~15-20 min wall time:
🤖 Generated with Claude Code