Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Nov 2, 2023

This implements the changes from the SDK here: getsentry/sentry-javascript#9437

If it encounters a request/response body with a MAYBE_TRUNCATED_JSON warning, it will try to auto-fix it with the same logic as we did in the SDK.

@mydea mydea requested review from billyvg and ryan953 November 2, 2023 12:10
@mydea mydea self-assigned this Nov 2, 2023
@mydea mydea requested a review from a team as a code owner November 2, 2023 12:10
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 2, 2023
@mydea mydea changed the title feat(replay): Fix truncated JSON bodies feat(replay): Fix truncated JSON request/response bodies Nov 2, 2023
type JsonObject = Record<string, unknown>;
type JsonArray = unknown[];

export type NetworkMetaWarning =
Copy link
Member

Choose a reason for hiding this comment

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

Is this exported from SDK at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

not right now! We can think about exporting this in the future. but probably this doesn't really make sense here, because we want to keep this broader - we want to keep all values that this could ever have here I think? as we also need to make sure to keep covering older versions?

@mydea mydea merged commit 6480e22 into master Nov 7, 2023
@mydea mydea deleted the fn/replay-body-truncated branch November 7, 2023 11:12
mydea added a commit to getsentry/sentry-javascript that referenced this pull request Nov 7, 2023
This is potentially performance intensive, so we should just do this in
the UI instead.

Part of #9426

This was implemented in Sentry in getsentry/sentry#59266
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants