-
Notifications
You must be signed in to change notification settings - Fork 225
Set the user ID for Observe #6458
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
Conversation
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]Caution After installing, validate the version by running just |
Coverage report
Show files with reduced coverage 🔻
Test suite run success3338 tests passing in 1383 suites. Report generated by 🧪jest coverage report action from a492300 |
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
MitchDickinson
left a comment
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.
Can we add a test before shipping as well?
|
|
||
| if (report) { | ||
| initializeBugsnag() | ||
| const userId = await getLastSeenUserIdAfterAuth() |
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.
This is returning unknown when not found. For example, when running shopify version unauthenticated.
@MitchDickinson should we better send undefined in that case so Observe sets the IP in that case? Not sure what's best...
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.
Falling back to the IP if the user ID is not found makes sense.
Set the user ID for Observe
WHY are these changes introduced?
We are not setting the user ID for Observe, so it's using the IP as a fallback:
More info: https://vault.shopify.io/page/Error-Management-FAQ~NUCh.md#how-are-unique-users-calculated
WHAT is this pull request doing?
Properly set the user ID if present
How to test your changes?
npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]shopify wronggg__observe_session_stability_userfieldMeasuring impact
How do we know this change was effective? Please choose one:
Checklist