Repository navigation
Classify attribute cardinality: identifier-like, growing, stable - #26
Merged
Merged
Conversation
zzylol
force-pushed
the
feat/cardinality
branch
from
October 13, 2026 00:20
1044695 to
bc18c6d
Compare
zzylol
force-pushed
the
feat/collector-containers
branch
2 times, most recently
from
October 19, 2026 14:57
0f795de to
2f7f010
Compare
zzylol
force-pushed
the
feat/cardinality
branch
from
October 19, 2026 14:57
bc18c6d to
0a87a9b
Compare
zzylol
force-pushed
the
feat/collector-containers
branch
from
October 19, 2026 17:33
2f7f010 to
bc9d102
Compare
zzylol
force-pushed
the
feat/cardinality
branch
3 times, most recently
from
October 19, 2026 20:16
4406c95 to
fa2ad10
Compare
zzylol
force-pushed
the
feat/collector-containers
branch
from
October 19, 2026 20:16
0001671 to
5b0d476
Compare
zzylol
force-pushed
the
feat/cardinality
branch
from
October 19, 2026 20:16
fa2ad10 to
bb23d46
Compare
zzylol
force-pushed
the
feat/collector-containers
branch
2 times, most recently
from
October 19, 2026 20:16
90b84c7 to
f8bc320
Compare
zzylol
force-pushed
the
feat/cardinality
branch
from
October 19, 2026 20:16
bb23d46 to
0663ed4
Compare
asap_sketches gains per_attribute: each point becomes one series per attribute key (attribute.key=<key>) whose values are sketched, so an HLL counts distinct values per key. The detector and exact_detector classify each key against its own recent windows (distinct/points >= 0.9 identifier-like; > 20% above the baseline mean growing) and emit the class as a gauge and class changes as OTLP log events (to Loki). Adds the cardinality scenario and dashboard; stage configs move to one directory per use case.
asap_sketches, window_merge and the answer processors keep their input in state instead of forwarding it, but never acked it. Upstream nodes that wait for acks (the official fanout does by default) then held each message until timeout, cutting a branch's throughput to about a quarter. Each processor now acks the input once it has taken it.
zzylol
force-pushed
the
feat/cardinality
branch
from
October 19, 2026 20:17
0663ed4 to
263bf5e
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 4 of the telemetry-functions stack: use case 1, cardinality and uniqueness.
What it adds
per_attributeinasap_sketches: each point becomes one series per attribute key (attribute.key=<key>,"*"= every key) whose values are sketched. An HLL then counts distinct values per key.asap_cardinality_state), and class changes are OTLP log events sent to Loki.user.idunique,k8s.pod.namegrowing 5% per minute,http.routeandhttp.methodfixed. Plus a dashboard.asap_sketches,window_mergeand the answer processors keep their input in state but never acked it, so an upstream node that waits for acks (the official fanout does by default) held each message until timeout. That cut a branch to about a quarter of the offered rate: 640,000 instead of 2.4 million points per window. They now ack. Every window delivers the full rate.Result (56-core x86 server, 1-minute windows, 2 × 20,000 points/s)
user.idk8s.pod.namehttp.routehttp.method(The
user.idrow was measured before the ack fix, when the window held 640,000 points.)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.