You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve Redux State Context presentation when attachReduxState option is used or when context is too large #9220
Currently, when a state is trimmed due to size limits we do not visually signal the user that the context has been trimmed. This is especially confusing when the user also uses the attachReduxState option, where now a portion of the state is in the middle of the issue and the full state at the bottom. The user scrolling through may not realize that the context is trimmed.
Solution Brainstorm
We should attach something to the context to signify that the context is being trimmed similarly to how we do it for messages with the ...
Maybe we should remove that context altogether when attachReduxState is used.
@Fwang36 can you please elaborate? I tried now with the massive Redux state (2000 items for one of the slices of Redux store) and can see that state trimmed after 1000 items with [MaxProperties ~] property value, instead of real value.
However, from the screenshot below you can see that all of the properties going in alphabetic order. And that means that sometimes the real last value wouldn't be displayed at the very bottom, and even can be somewhere in the middle.
From what I remember of the user's original issue (I'm not fully sure if I am remembering everything correctly), the redux state gets attached as a Context to the event. That makes it limited by our size limits on context objects of 8kb. We work around this by providing the attachReduxState option in the sdk. This option makes it so that the Redux State gets attached to the event as an attachment all the way to the bottom.
The result of this is 2 sets of the Redux state in the event. One as a context object, and one as a attachment. There was no indication that the context object is getting trimmed by the context size limits, so users may assume they are seeing the whole state without ever checking the attachment.
My suggestion would be maybe for the sdk to not create the context object at all, when attachReduxState is enabled.
It would definitely make sense to have better control over whether the state is attached as context or as attachment. There are considerations with quota for attachments so disabling the context object when attachReduxState is enabled is not the best approach imo
Sadly, it is very involved and I hate setting it up personally but I am sure you can pull through 😂
You probably want to sync with the issues team though for this change - what I want to avoid is you putting a lot of work into a PR just for us to reject it. @rachrwang is the person for this I believe.
Hi @AleshaOleg, thanks for the suggested solution!
We actually have a system for displaying metadata like size limitations but it may not be getting applied correctly in this case. We've also recently reworked context on the client side so it might be a good time to take a look at this. Would you be able to provide a link to a test event, or perhaps just the event payload for one of these issues with a large redux state?
Activity
AleshaOleg commentedon Jan 24, 2024
@Fwang36 can you please elaborate? I tried now with the massive Redux state (2000 items for one of the slices of Redux store) and can see that state trimmed after 1000 items with
[MaxProperties ~]property value, instead of real value.However, from the screenshot below you can see that all of the properties going in alphabetic order. And that means that sometimes the real last value wouldn't be displayed at the very bottom, and even can be somewhere in the middle.
Am I getting the issue correctly?
Fwang36 commentedon Jan 24, 2024
Hey @AleshaOleg ,
Thanks for taking a look!
From what I remember of the user's original issue (I'm not fully sure if I am remembering everything correctly), the redux state gets attached as a Context to the event. That makes it limited by our size limits on context objects of 8kb. We work around this by providing the
attachReduxStateoption in the sdk. This option makes it so that the Redux State gets attached to the event as an attachment all the way to the bottom.The result of this is 2 sets of the Redux state in the event. One as a context object, and one as a attachment. There was no indication that the context object is getting trimmed by the context size limits, so users may assume they are seeing the whole state without ever checking the attachment.
My suggestion would be maybe for the sdk to not create the context object at all, when
attachReduxStateis enabled.lforst commentedon Jan 25, 2024
It would definitely make sense to have better control over whether the state is attached as context or as attachment. There are considerations with quota for attachments so disabling the context object when attachReduxState is enabled is not the best approach imo
20 remaining items
lforst commentedon May 10, 2024
@AleshaOleg Oh, I see! Yes, the repository for this is https://github.com/getsentry/sentry but you probably want to follow the guide on how to set up the dev environment: https://develop.sentry.dev/environment/
Sadly, it is very involved and I hate setting it up personally but I am sure you can pull through 😂
You probably want to sync with the issues team though for this change - what I want to avoid is you putting a lot of work into a PR just for us to reject it. @rachrwang is the person for this I believe.
leeandher commentedon May 17, 2024
Hi @AleshaOleg, thanks for the suggested solution!
We actually have a system for displaying metadata like size limitations but it may not be getting applied correctly in this case. We've also recently reworked context on the client side so it might be a good time to take a look at this. Would you be able to provide a link to a test event, or perhaps just the event payload for one of these issues with a large redux state?
AleshaOleg commentedon May 17, 2024
Hi @leeandher! I have this one for example - https://aleshaoleg.sentry.io/issues/5232136729/?environment=production&project=4506622892834816&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=30d&stream_index=0
I see now that there's no
Application State -> State (Redux)field. ButAttachmentsfor Redux state are much more easier to navigate.So, I don't think issue now makes sense, in my opinion it can be closed.
mydea commentedon Dec 10, 2024
Why was this issue closed?
This issue hasn't been touched recently and no longer seems relevant.
Hence, we're closing it to maintain a clean and transparent backlog.
Please feel free to leave a comment if you think this issue should be reopened.