Repository navigation
Add a temporary seeded scenario generator receiver - #24
Merged
Merged
Conversation
zzylol
force-pushed
the
feat/scenario-generator
branch
from
October 13, 2026 00:20
2059d27 to
dac5fa3
Compare
zzylol
force-pushed
the
refactor/asapv1-only
branch
from
October 13, 2026 00:20
2bd3e0c to
974b425
Compare
zzylol
force-pushed
the
feat/scenario-generator
branch
from
October 19, 2026 14:57
dac5fa3 to
c5ff0ac
Compare
zzylol
force-pushed
the
refactor/asapv1-only
branch
from
October 19, 2026 17:33
974b425 to
ddfc22e
Compare
zzylol
force-pushed
the
feat/scenario-generator
branch
from
October 19, 2026 17:33
c5ff0ac to
454ac55
Compare
zzylol
force-pushed
the
refactor/asapv1-only
branch
from
October 19, 2026 20:15
ddfc22e to
cff741c
Compare
zzylol
force-pushed
the
feat/scenario-generator
branch
2 times, most recently
from
October 19, 2026 20:16
0a710be to
994214d
Compare
zzylol
force-pushed
the
refactor/asapv1-only
branch
from
October 19, 2026 20:16
cff741c to
143d4a5
Compare
urn:asap:receiver:scenario_generator sends Gauge points whose attribute cardinality (fixed, unique per source, growing), key popularity (uniform or Zipf) and value distribution follow a config, with changes at set times: a drifting series or a new heavy key. It stands in until the official OTAP traffic generator gains these options. The points depend only on scenario time: batch i of second s is sent at s + i/n seconds, stamped with that time, from an RNG seeded by (seed, s, i). Generators with the same config and start (ASAP_SCENARIO_START) send identical data, so several pipelines can be fed the same input.
zzylol
force-pushed
the
feat/scenario-generator
branch
from
October 19, 2026 20:16
994214d to
46f7092
Compare
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.
Part 2 of the telemetry-functions stack.
The official OpenTelemetry traffic generator cannot yet shape attribute cardinality, key popularity or value distributions, or change them over time:
syntheticmode uses fixed value pools, andsemantic_conventionsmode sends every metric value as 1.0 (its TODO: "add configurable value range, distribution"). These options are planned upstream. Until then, this receiver stands in, with a config shaped like the upstream proposal so it can be swapped out.What it does
urn:asap:receiver:scenario_generatorsends Gauge points atsignals_per_second, inmax_batch_sizebatches spread evenly over each second, with the official generator's control handling.Values are seeded, so a seed and config reproduce the same stream. Unique values include the seed, so two sources never share them.
The points depend only on scenario time. Batch i of the n batches of second s after the scenario start is sent at s + i/n seconds, stamped with that time, and drawn from an RNG seeded by (
seed, s, i). The start is the Unix second inASAP_SCENARIO_START(the next whole second when unset), andchangescount from it. Generators with the same config and start therefore send identical points even if they start a little apart; a generator that falls behind skips batches rather than shifting later ones. This is what lets #25 feed three separate pipelines the same input.Validation
Unit tests cover cardinality (fixed and unique), Zipf skew, changes after their time, reproducibility, and that a batch depends only on its second and index.
cargo fmt --check,cargo clippy --all-targets --features otap-engine,stream-benchmark -- -D warningsandcargo test --features otap-engine,stream-benchmarkpass at this PR's head.