Skip to content

Conversation

@dgbailey
Copy link
Contributor

@dgbailey dgbailey commented Feb 9, 2022

Changes primarily reflect setting user context early in App.tsx. Additionally this context is added to outgoing GET and POST requests from scope to transfer user context to connected services.

  • Small changes to sentry.properties in each project to reflect new project name (react-native).
  • Changes to the dispatch payload that populates form data. Setting user context with email early in the application was causing inconsistency with form data that is randomly populated. The email on the transaction/event differed from what the user sees onscreen in the form.
  • Changes to Screens that fetch or post data in order to add user context.

Example Transactions:
https://sentry.io/organizations/testorg-az/discover/results/?field=transaction&field=user.email&field=count%28%29&name=Transactions+by+Volume&query=project%3Areact-native+has%3Auser.email+event.type%3Atransaction&sort=-count&statsPeriod=7d&yAxis=count%28%29

Changes primarily reflect setting user context early in App.tsx. Additionally this context is added to outgoing GET and POST requests from scope to transfer user context to connected services.
Copy link
Contributor

@thinkocapo thinkocapo left a comment

Choose a reason for hiding this comment

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

Approve but if you could answer the questions for my knowledge please

placeholder={item.placeholder}
onPressIn={() => {
dispatch({ type: 'FILL_FIELDS', payload: 'dummydata' })}
dispatch({ type: 'FILL_FIELDS', payload: 'dummydata', onScope:email ? email:null})}
Copy link
Contributor

Choose a reason for hiding this comment

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

@dgbailey this onScope stuff works great. Wondering, is this a property or part of the redux or React Context API? Or is it more like a property you're declaring and it simply gets passed through.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @thinkocapo just declaring it myself so it gets passed.

setProductData(null);
let se, customerType, email;
Sentry.withScope(function(scope) {
[ se, customerType ] = [scope._tags.se, scope._tags.customerType ]
Copy link
Contributor

Choose a reason for hiding this comment

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

@dgbailey what was the workaround for letting you take _tags data off of the scope? Wasn't it preventing you at first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thinkocapo Turns out the compiler will warn about what is deemed inappropriate use of a protected field but do nothing to prevent it at runtime.

@thinkocapo
Copy link
Contributor

@dgbailey I saw all the backend transactions + errors (Flask) had the user email set as well.

We have a different todo open for some user info missing on Springboot or Express transactions, but someone is already on it. That's a backend problem. Now the frontend looks solid. 👍 merge it

@thinkocapo thinkocapo merged commit 0dee690 into master Feb 14, 2022
@krystofwoldrich krystofwoldrich deleted the feat_set_useremail_override branch February 12, 2025 09:35
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.

2 participants