Skip to content
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

Posthog: Stop double reporting UTD events when app is relaunched #2333

Closed
3 tasks done
BillCarsonFr opened this issue Mar 11, 2024 · 5 comments
Closed
3 tasks done

Posthog: Stop double reporting UTD events when app is relaunched #2333

BillCarsonFr opened this issue Mar 11, 2024 · 5 comments
Labels
A-Telemetry Telemetry / analytics to understand usage Team: Crypto

Comments

@BillCarsonFr
Copy link
Member

BillCarsonFr commented Mar 11, 2024

Currently we don't persist the list of UTD events that has been reported (in memory only).
This impacts the accuracy of metrics in posthog.

We need to find a way to stop doing that:

  • Client side by persisting the list of events reported (beware of storage as this can only grow forever?)
  • Maybe possible to have the Posthog ingestion pipeline deduplicate? Not very confident as we don't have access to event_id and timestamp
  • Create a posthog plugin (data_in) that would allow to deduplicate based on some properties in the captured event (hash of event_id?) Some plugins are close but not exactly that

Tasks

  1. A-Telemetry Team: Crypto
    BillCarsonFr
@BillCarsonFr BillCarsonFr added A-Telemetry Telemetry / analytics to understand usage Team: Crypto labels Mar 11, 2024
@BillCarsonFr
Copy link
Member Author

The graph we are focusing on are Unique UTD, so stop sending double reports won't impact the graphs.

@BillCarsonFr
Copy link
Member Author

Related #2332

@kegsay We depriosrised because we only focus on unique errors. But double reporting will be annoying if we add the new properties. For example a permanent UTD would be reported several times with different eventLocalAgeAtDecryptionFailure or userTrustsOwnIdentity, maybe it will then be more annoying to analyse the data.

@t3chguy
Copy link
Member

t3chguy commented May 1, 2024

Wouldn't we still be double-reporting between clients/sessions, especially as in pseudonymous mode the analytics all link to the same ID for cross-client matching.

@uhoreg
Copy link
Member

uhoreg commented May 1, 2024

Yes, but I think we sort-of want that. If a user has multiple clients, and none of them can decrypt it, then that's different from if only one of them can't decrypt it. There might be something better that we can do in the case of multiple clients not being able to decrypt a single event. But as far as this particular issue is involved, what we want to avoid is if a user restarts the client and it reports a UTD, but it's the same UTD that it reported earlier and of course it's still a UTD, but we can't distinguish that report from the client having received a new event that is another UTD.

@richvdh richvdh changed the title Posthog: Stop double reporting UTDs events when app is relaunched. Posthog: Stop double reporting UTD events when app is relaunched May 14, 2024
@richvdh
Copy link
Member

richvdh commented Jun 20, 2024

I think this is done.

@richvdh richvdh closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Telemetry Telemetry / analytics to understand usage Team: Crypto
Projects
None yet
Development

No branches or pull requests

4 participants