RI-8224 Telemetry events for array key flows#6159
Open
VaskoAtanasovRedis wants to merge 1 commit into
Open
Conversation
Fires one analytics event per array affordance: View/Search/Aggregate query runs, element add/edit, key creation by mode (contiguous/sparse), and sample dataset load. Run events fire only on explicit user runs; auto-fetches on key switch, reset, and reveal stay silent. Backfills test assertions for the existing element/range delete events. References: #RI-8224
Contributor
Code Coverage - Frontend unit tests
Test suite run success7620 tests passing in 847 suites. Report generated by 🧪jest coverage report action from 747fe0b |
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.
What
Adds the missing analytics events for the array key type, following the Vector Set pattern:
ARRAY_VIEW_QUERY_RUN,ARRAY_SEARCH_QUERY_RUN,ARRAY_AGGREGATE_QUERY_RUN- fired only on an explicit Run in each tab (auto-fetch on key switch, reset, and reveal stay silent); eventData carries the query shape (flags, counts, criteria discriminators), never user values.ARRAY_ELEMENT_ADDED(mode: append | at_index) andARRAY_ELEMENT_EDITED- fired in the slice thunks on confirmed writes, mirroring the existing delete events.ARRAY_CREATED(source: scratch | sample_dataset,mode: contiguous | sparsefor scratch) andARRAY_SAMPLE_DATASET_LOADED(collectionName) - fired from the AddKey form; nothing fires when the sample key already exists or the import fails.Also backfills missing test assertions for the existing
ARRAY_ELEMENT_DELETED/ARRAY_RANGE_DELETEDevents.Testing
yarn lint:ui,yarn type-checkgreen.Closes #RI-8224
Note
Low Risk
Analytics-only instrumentation with no change to Redis commands or auth; behavior is additive and heavily test-covered.
Overview
Adds array key telemetry aligned with the Vector Set pattern: new
TelemetryEventvalues andsendEventTelemetrycalls across create, query, and CRUD flows.Create (
AddKeyArray) emitsARRAY_CREATED(scratch vssample_dataset, contiguous/sparse for manual) andARRAY_SAMPLE_DATASET_LOADED(collectionName) on successful sample import; sample duplicate-key and failed import paths stay silent. Manual create firesARRAY_CREATEDfrom theaddArrayKeysuccess callback.Key details hooks fire query events only on explicit user Run / Search:
ARRAY_VIEW_QUERY_RUN(showEmpty),ARRAY_SEARCH_QUERY_RUN(counts, criteria types, flags—no predicate values),ARRAY_AGGREGATE_QUERY_RUN(operation). Auto-fetch on key switch, reset, reveal, and not-ready clicks do not emit.Redux array thunks emit
ARRAY_ELEMENT_ADDED(append|at_index) andARRAY_ELEMENT_EDITEDon successful API responses, alongside existing delete events.Unit tests assert happy-path payloads and silence on failure, stale selection, and non-user-initiated paths; slice CRUD tests use module reload to mock telemetry.
Reviewed by Cursor Bugbot for commit 747fe0b. Bugbot is set up for automated code reviews on this repo. Configure here.