-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add handling for alias events in tracked users report #4899
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4899 +/- ##
==========================================
+ Coverage 74.39% 74.48% +0.09%
==========================================
Files 428 428
Lines 49763 49768 +5
==========================================
+ Hits 37019 37070 +51
+ Misses 10301 10258 -43
+ Partials 2443 2440 -3 ☔ View full report in Codecov by Sentry. |
e6f08dc
to
4aed384
Compare
// userHLL: {user1, user2}, anonHLL: {anon1}, identifiedAnonHLL: {user1-anon1, user2} | ||
// cardinality: len(userHLL)+len(anonHLL)-len(identifiedAnonHLL): 2+1-2 = 1 | ||
if eventType == eventTypeAlias { | ||
previousID := gjson.GetBytes(job.EventPayload, "batch.0.previousId").String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we only looking at the first entry in batch
and not all entries ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each batch will have only have 1 event. Even if on gateway we receive a batch request we break that down and we create a new entry for each event in a batch. and each entry will be like {"batch":[{event...}]}
Description
We will add previousID that we received in the identifiedAnonID bucket so that it will be substracted from the total count. e.g
https://www.rudderstack.com/docs/event-spec/standard-events/alias/
ref: https://rudderlabs.slack.com/archives/C075KC5G81G/p1720670222299599
Linear Ticket
https://linear.app/rudderstack/issue/PIPE-1305/add-handling-for-alias-events-in-mtu
Security