Story 15.3: JOIN query counter — elasticsql (TelemetryCollector + TelemetryData)#111
Merged
Conversation
…lector (Story 15.3) Adds a per-interval, 3-row cross-index JOIN counter to the runtime telemetry layer so the Story-15.2 daily ping carries a join_query_count delta and the R1 dashboard (15.5) can measure JOIN workload — integers only, no PII. - TelemetryCollector: JoinRow enum (Passthrough/CrossCluster/Coordinator), 3 AtomicLong buckets, incrementJoin(JoinRow), collectAndResetJoinCounts() helper; collect() reads .get() (no reset), collectAndReset() reads .getAndSet(0L) (per-interval delta flush). Noop overrides added. - TelemetryData: += joinQueryCount (total) + joinQueryByRow (always all 3 keys, even 0). joinQueryCount == passthrough + cross_cluster + coordinator. Per- interval DELTAS, distinct from the cumulative queriesTotal (left unchanged). - 8 new TelemetryCollectorSpec tests (per-row, all-3-keys, no-reset-on-collect, reset-on-collectAndReset, collectAndResetJoinCounts, concurrency, no-PII, Noop). Cross-compiles clean 2.12.20 + 2.13.16; 16/16 spec pass. Closed Issue #110 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 22, 2026
Closed
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.
Story 15.3 — JOIN query counter (elasticsql /
licensing)Closes #110. Part of Epic 15 (telemetry). Adds the per-interval, 3-row disaggregated cross-index JOIN counter to the runtime telemetry layer (the counter CARRIER). The increment hooks live downstream in softclient4es-arrow; the AC-5a disabled-tick reset in softclient4es-extensions.
Changes (
licensingmodule)TelemetryCollector.scala:JoinRowenum (Passthroughrow 1 /CrossClusterrow 2 /Coordinatorrow 3), 3AtomicLongbuckets,incrementJoin(JoinRow)(lock-free, mirrorsincrementQueries),collectAndResetJoinCounts(): (Long, Map[String,Long]).collectreads.get()(no reset);collectAndResetreads.getAndSet(0L)(per-interval delta flush).TelemetryData+=joinQueryCount(total) +joinQueryByRow(always all 3 keys, even 0).Noopoverrides added.queriesTotal(left unchanged).TelemetryCollectorSpec.scala: 8 new tests — 16/16 pass.Key behaviours
joinQueryCount == passthrough + cross_cluster + coordinatoron every collected snapshot.Build
scalafmtAll;+ licensing/compile++ core/compileclean (Scala 2.12.20 + 2.13.16). Publishedsoftclient4es-licensing+softclient4es-sql0.20-SNAPSHOT locally for the downstream arrow build.Sibling PRs (Epic 15 / Story 15.3)
🤖 Generated with Claude Code