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

Fix missing telemetry fields #1863

Merged
merged 6 commits into from
Sep 6, 2024
Merged

Fix missing telemetry fields #1863

merged 6 commits into from
Sep 6, 2024

Conversation

chrmod
Copy link
Member

@chrmod chrmod commented Sep 5, 2024

Those data points were always a part of the minimalistic telemetry signals that were used in Ghostery 8.

@chrmod chrmod changed the title Fix missing telemetry data Fix missing telemetry fields Sep 5, 2024
@chrmod chrmod added the Bug Something isn't working label Sep 5, 2024
philipp-classen
philipp-classen previously approved these changes Sep 5, 2024
extension-manifest-v3/src/store/options.js Outdated Show resolved Hide resolved
extension-manifest-v3/src/store/options.js Outdated Show resolved Hide resolved
Comment on lines +59 to +61
installDate:
options.installDate || new Date().toISOString().split('T')[0],
installRandom: Math.floor(Math.random() * 100) + 1,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are now part of the telemetry storage instead of options

if (!storage.installDate) {
saveStorage(storage, {
installDate:
options.installDate || new Date().toISOString().split('T')[0],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That part still confuses me: why there is a fallback to options for installDate, but not for the random number. It is not obvious to me, why we need the fallback here? If storage.installDate is not present, how can options have it?

Copy link
Member

@philipp-classen philipp-classen Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, options.installDate is migration code? And installRandom did not exist before.

If so, could we leave a comment that "options.installDate || " exists to migrate data from old clients? And that we could eventually remove it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment added

@chrmod chrmod merged commit e156c7e into main Sep 6, 2024
2 checks passed
@chrmod chrmod deleted the fix-missing-telemetry branch September 6, 2024 11:12
@smalluban smalluban mentioned this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants