Skip to content

Improve Redux State Context presentation when attachReduxState option is used or when context is too large #9220

Closed as not planned

Description

@Fwang36

Problem Statement

Feedback from a user.

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.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Oct 10, 2023
  2. AleshaOleg commented on Jan 24, 2024

    @AleshaOleg
    Contributor

    @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?

    Screenshot from 2024-01-24 01-12-21

  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Jan 24, 2024
  4. Fwang36 commented on Jan 24, 2024

    @Fwang36
    Author

    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 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.

  5. lforst commented on Jan 25, 2024

    @lforst
    Contributor

    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

  6. 20 remaining items

  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 8, 2024
  8. lforst commented on May 10, 2024

    @lforst
    Contributor

    @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.

  9. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 10, 2024
  10. leeandher commented on May 17, 2024

    @leeandher
    Member

    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?

  11. self-assigned this
    on May 17, 2024
  12. AleshaOleg commented on May 17, 2024

    @AleshaOleg
    Contributor

    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. But Attachments for Redux state are much more easier to navigate.

    So, I don't think issue now makes sense, in my opinion it can be closed.

  13. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 17, 2024
  14. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 21, 2024
  15. mydea commented on Dec 10, 2024

    @mydea
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions