-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(develop): Allow to pass user_agent
as browser context
#13205
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
sgtm. Before we merge this we should actually implement this in Relay.
After talking with @Dav1dde we will actually not do that, because it is hard for relay to partial-update contexts. Instead, relay can use the user-agent from the browser envelope request itself, which should already be here - which is great, because it means the SDK does not need to do/send anything 💪 |
Scary. In the case of tunneling this information is lost. "Hard for relay to partially update contexts" also seems a bit ridiculous. |
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.
We actually need to figure out how this will be handled in Relay fist.
- If there is no browser context, Relay creates one
- How does the presence of a
user_agent
fit in in the current behavior - How do we merge partial context
Related to #13203
Today, the browser context is inferred in relay from
event.request.headers['user-agent']
. This is slightly weird in the context of a browser event, as the page is not really the request - we want to replace this with something more explicit.In order to make this possible, we propose to allow client SDKs to send a partial
browser
context with only user-agent, and have relay infer the rest of the data from this, if it exists (instead of fromevent.request
).