feat(develop): Allow to pass user_agent as browser context - #13205
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
lforst
left a comment
There was a problem hiding this comment.
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. |
cleptric
left a comment
There was a problem hiding this comment.
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_agentfit in in the current behavior - How do we merge partial context
|
I think the plan of action for relay is:
|
|
@cleptric are we good with merging this? I think we agreed that this makes sense from a spec-perspective, or should we merge the relay change before we merge this in develop docs? |
cleptric
left a comment
There was a problem hiding this comment.
I'm good with merging this, if we don't forgot to also add it in Relay 😬
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
browsercontext with only user-agent, and have relay infer the rest of the data from this, if it exists (instead of fromevent.request).