Skip to content

Conversation

@rosahbruno
Copy link
Contributor

@rosahbruno rosahbruno commented Dec 16, 2023

PR for updating Glean schema: mozilla-services/mozilla-pipeline-schemas#795

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work

@rosahbruno rosahbruno changed the title Gleanjs session implementation Bug 1862955 - Gleanjs session implementation Dec 18, 2023
rosahbruno added a commit to rosahbruno/glean.js that referenced this pull request Dec 18, 2023
@rosahbruno rosahbruno marked this pull request as ready for review December 19, 2023 13:58
@auto-assign auto-assign bot requested a review from chutten December 19, 2023 13:58
Copy link
Contributor

@chutten chutten left a comment

Choose a reason for hiding this comment

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

We're firm on 30mins? Might make testing difficult (btw, where are the tests?) unless we make that parametrized. (in addition to the existing testing difficulties with using Date)

@rosahbruno
Copy link
Contributor Author

rosahbruno commented Feb 1, 2024

We're firm on 30mins? Might make testing difficult

Based on everything that Abhishek found when researching sessions, it seems like 30 minutes is the standard here. I believe we can make 30 minutes the default.

(btw, where are the tests?)

Tests are on their way (after I fix the last part)

unless we make that parametrized. (in addition to the existing testing difficulties with using Date)

I agree this should be parameterized. I think 30 will be the default value unless someone provides a different value when initializing Glean. I will make some changes and push that up.

@rosahbruno rosahbruno requested a review from chutten February 7, 2024 19:24
@Dexterp37 Dexterp37 requested a review from quiiver February 8, 2024 15:17
Copy link

@quiiver quiiver left a comment

Choose a reason for hiding this comment

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

:shipit:

@quiiver
Copy link

quiiver commented Feb 12, 2024

This is not something that we have discussed. As a data steward, what are your thoughts here? Should we allow for session information without a client ID? Or should pings with no client ID also have no session info?

Probably best to disallow session tracking if client_id is disabled

Copy link
Contributor

@chutten chutten left a comment

Choose a reason for hiding this comment

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

I don't know how easy it'll be, but if we want to support pings without client_id we need to ensure we aren't making it trivially obtainable via session_id

@rosahbruno
Copy link
Contributor Author

@chutten
So I just want to make sure I am understanding - a ping sent with no client_id should also not include the session_id or the session_count? I agree with what you've said above, I just want to make sure I understand completely what the ask is before I start making any changes.

@chutten
Copy link
Contributor

chutten commented Feb 13, 2024

@chutten So I just want to make sure I am understanding - a ping sent with no client_id should also not include the session_id or the session_count? I agree with what you've said above, I just want to make sure I understand completely what the ask is before I start making any changes.

I don't know of a strong reason to exclude session_count. Yeah, there's some timing fingerprinting possible, but given the sizes of our populations and the ability for custom ping definitions to limit the precision of the timestamps, I'm not too worried.

But, yes, if there's no client_id there should be no session_id (as that would trivially permit deriving the client_id by looking for a ping where a client_id is sent and it shares the same session_id).

@rosahbruno
Copy link
Contributor Author

@chutten
I've made updates to exclude the session_id whenever the ping doesn't include the client_id.

A ping for reference: https://debug-ping-preview.firebaseapp.com/pings/glean-from-website/fa376d6f-f83d-45c6-a697-9fecdcfededf#L18

@rosahbruno rosahbruno merged commit 3027e1e into mozilla:main Feb 22, 2024
@rosahbruno rosahbruno deleted the 1862955-sessions branch February 22, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants