René's URL Explorer Experiment


Title: feat(replay): Truncate network bodies to max size by mydea · Pull Request #7875 · getsentry/sentry-javascript · GitHub

Open Graph Title: feat(replay): Truncate network bodies to max size by mydea · Pull Request #7875 · getsentry/sentry-javascript

X Title: feat(replay): Truncate network bodies to max size by mydea · Pull Request #7875 · getsentry/sentry-javascript

Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.

Open Graph Description: This PR updates the replay network body capture by truncating bodies to the max size of 150k characters. The key part is, that we try to fix truncated JSON, if possible, so it remains a valid JSON ...

X Description: This PR updates the replay network body capture by truncating bodies to the max size of 150k characters. The key part is, that we try to fix truncated JSON, if possible, so it remains a valid JSON ...

Opengraph URL: https://github.com/getsentry/sentry-javascript/pull/7875

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:e3088788-cdf2-2735-4550-e97a0b991d3b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8A58:22E53E:21E5FC:2D633B:6B04991C
html-safe-nonce1c346552f4f80f2d723720621f37d77ad0d909dff8b92e30769c97156779eafd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTU4OjIyRTUzRToyMUU1RkM6MkQ2MzNCOjZCMDQ5OTFDIiwidmlzaXRvcl9pZCI6IjIzOTM3MzMyOTMzMTQxODU1MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc2792b613fdcb4e55302992faebf8d7d81582f9bdd33498a1a4ea6115b968763
hovercard-subject-tagpull_request:1316420060
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/getsentry/sentry-javascript/7875/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/5803bb22581111dcddf33e44bf048a597702d2a5762e4ab2aabc36f03119ad6d/getsentry/sentry-javascript/pull/7875
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5803bb22581111dcddf33e44bf048a597702d2a5762e4ab2aabc36f03119ad6d/getsentry/sentry-javascript/pull/7875
og:image:altThis PR updates the replay network body capture by truncating bodies to the max size of 150k characters. The key part is, that we try to fix truncated JSON, if possible, so it remains a valid JSON ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemydea
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
turbo-cache-controlno-cache
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/pull/7875#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F7875
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F7875
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/pull/7875
Reloadhttps://github.com/getsentry/sentry-javascript/pull/7875
Reloadhttps://github.com/getsentry/sentry-javascript/pull/7875
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues334 (334)https://github.com/getsentry/sentry-javascript/issues
Pull requests53 (53)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
mydeahttps://github.com/mydea
develophttps://github.com/getsentry/sentry-javascript/tree/develop
fn/replay-body-truncatehttps://github.com/getsentry/sentry-javascript/tree/fn/replay-body-truncate
Conversationhttps://github.com/getsentry/sentry-javascript/pull/7875
Commits6 (6)https://github.com/getsentry/sentry-javascript/pull/7875/commits
Checkshttps://github.com/getsentry/sentry-javascript/pull/7875/checks
Files changedhttps://github.com/getsentry/sentry-javascript/pull/7875/files
feat(replay): Truncate network bodies to max sizehttps://github.com/getsentry/sentry-javascript/pull/7875#top
mydeahttps://github.com/mydea
develophttps://github.com/getsentry/sentry-javascript/tree/develop
fn/replay-body-truncatehttps://github.com/getsentry/sentry-javascript/tree/fn/replay-body-truncate
https://github.com/mydea
mydeahttps://github.com/mydea
Apr 17, 2023https://github.com/getsentry/sentry-javascript/pull/7875#issue-1670939632
#7730https://github.com/getsentry/sentry-javascript/pull/7730
#7531https://github.com/getsentry/sentry-javascript/issues/7531
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/mydea
mydeahttps://github.com/mydea
Package: replay https://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20replay%22
Apr 17, 2023https://github.com/getsentry/sentry-javascript/pull/7875#event-9023062222
https://github.com/mydea
mydeahttps://github.com/mydea
AbhiPrasadhttps://github.com/AbhiPrasad
Lms24https://github.com/Lms24
billyvghttps://github.com/billyvg
lforsthttps://github.com/lforst
April 17, 2023 11:11https://github.com/getsentry/sentry-javascript/pull/7875#event-9023062249
https://github.com/mydea
mydeahttps://github.com/mydea
Apr 17, 2023https://github.com/getsentry/sentry-javascript/pull/7875#event-9023062378
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Apr 17, 2023https://github.com/getsentry/sentry-javascript/pull/7875#issuecomment-1511159237
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/billyvg
billyvghttps://github.com/billyvg
Apr 18, 2023 https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1390399217
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/7875/files
billyvghttps://github.com/billyvg
https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1390399217
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
packages/replay/src/util/truncateJson/fixJson.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-dd742e03df73525f0b754b17202ad7c839b672e16bc31ab011ef00e641364409
billyvghttps://github.com/billyvg
Apr 18, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1170215775
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
mydeahttps://github.com/mydea
Apr 18, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1170263411
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
packages/replay/test/unit/coreHandlers/util/truncateJson/fixJson.test.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-b70ab3498e3a1618bb76a9b2cadcb38e6f28f337fbc6f9df539cbc7a7e0329e3
billyvghttps://github.com/billyvg
Apr 18, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1170227384
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
mydeahttps://github.com/mydea
Apr 18, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1170264452
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
mydeahttps://github.com/mydea
Apr 19, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1171146243
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/Lms24
Lms24https://github.com/Lms24
Apr 19, 2023 https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1391567761
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/7875/files
Lms24https://github.com/Lms24
https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1391567761
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
packages/replay/src/coreHandlers/util/networkUtils.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-5c77214b9a71ca5af94893f7a1a947b2db8bf40d815eb53f2b43c28119e9347c
Lms24https://github.com/Lms24
Apr 19, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1171017556
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
mydeahttps://github.com/mydea
Apr 19, 2023https://github.com/getsentry/sentry-javascript/pull/7875#discussion_r1171145572
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@billyvghttps://github.com/billyvg
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/mydea
mydeahttps://github.com/mydea
force-pushedhttps://github.com/getsentry/sentry-javascript/compare/6c34d3ab97457be20475852164c7e9d1d570152e..e20f9ec3826cf9150efa65ba241d0e8a7c72a763
6c34d3ahttps://github.com/getsentry/sentry-javascript/commit/6c34d3ab97457be20475852164c7e9d1d570152e
e20f9echttps://github.com/getsentry/sentry-javascript/commit/e20f9ec3826cf9150efa65ba241d0e8a7c72a763
Compare https://github.com/getsentry/sentry-javascript/compare/6c34d3ab97457be20475852164c7e9d1d570152e..e20f9ec3826cf9150efa65ba241d0e8a7c72a763
April 19, 2023 10:28https://github.com/getsentry/sentry-javascript/pull/7875#event-9044976355
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
Apr 19, 2023 https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1391627138
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/7875/files
packages/replay/src/coreHandlers/util/networkUtils.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-5c77214b9a71ca5af94893f7a1a947b2db8bf40d815eb53f2b43c28119e9347c
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
packages/replay/src/util/truncateJson/completeJson.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-84d1f9ee87a33c9e3711b6abe40de3d9840a92ec9ad3751a6732e5019258453d
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
packages/replay/src/util/truncateJson/constants.tshttps://github.com/getsentry/sentry-javascript/pull/7875/files#diff-d5d4d78bfbce9ad64fc32141c4029f5a96101db4a6cd9864a3d6c8d149a1abfe
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/mydea
mydeahttps://github.com/mydea
force-pushedhttps://github.com/getsentry/sentry-javascript/compare/1186380860244f848878d6fa1a4b79484fb92a57..3a183652b89801cd8b9792a6d1563b957459702d
1186380https://github.com/getsentry/sentry-javascript/commit/1186380860244f848878d6fa1a4b79484fb92a57
3a18365https://github.com/getsentry/sentry-javascript/commit/3a183652b89801cd8b9792a6d1563b957459702d
Compare https://github.com/getsentry/sentry-javascript/compare/1186380860244f848878d6fa1a4b79484fb92a57..3a183652b89801cd8b9792a6d1563b957459702d
April 19, 2023 15:56https://github.com/getsentry/sentry-javascript/pull/7875#event-9048343437
mydeahttps://github.com/mydea
April 20, 2023 08:59https://github.com/getsentry/sentry-javascript/pull/7875#commits-pushed-39d8ca8
https://github.com/mydea
feat(replay): Truncate network bodies to max sizehttps://github.com/getsentry/sentry-javascript/pull/7875/commits/39d8ca8b5899a9fd34c8c44f1d2a1582762eabfd
39d8ca8https://github.com/getsentry/sentry-javascript/pull/7875/commits/39d8ca8b5899a9fd34c8c44f1d2a1582762eabfd
https://github.com/mydea
ref: Handle more edge cases & add large testhttps://github.com/getsentry/sentry-javascript/pull/7875/commits/7f2c7057f558a7fa041347a187f172bcf3e9b3ca
7f2c705https://github.com/getsentry/sentry-javascript/pull/7875/commits/7f2c7057f558a7fa041347a187f172bcf3e9b3ca
https://github.com/mydea
https://github.com/AbhiPrasad
Apply suggestions from code reviewhttps://github.com/getsentry/sentry-javascript/pull/7875/commits/92fe1ca8f925fa395ea0162a864450ef018d4554
92fe1cahttps://github.com/getsentry/sentry-javascript/pull/7875/commits/92fe1ca8f925fa395ea0162a864450ef018d4554
https://github.com/mydea
ref: Avoid duplicate lastIndexOf callshttps://github.com/getsentry/sentry-javascript/pull/7875/commits/8c89a71d99fcd38a6c3056436dd70f632f010737
8c89a71https://github.com/getsentry/sentry-javascript/pull/7875/commits/8c89a71d99fcd38a6c3056436dd70f632f010737
https://github.com/mydea
fix lintinghttps://github.com/getsentry/sentry-javascript/pull/7875/commits/8908a8e492f1a3ba171d348d3db430d774050206
8908a8ehttps://github.com/getsentry/sentry-javascript/pull/7875/commits/8908a8e492f1a3ba171d348d3db430d774050206
https://github.com/mydea
ref: Use number consts for json parsinghttps://github.com/getsentry/sentry-javascript/pull/7875/commits/57efea872805fb6fb02a1faf3582428d2f3552be
57efea8https://github.com/getsentry/sentry-javascript/pull/7875/commits/57efea872805fb6fb02a1faf3582428d2f3552be
https://github.com/mydea
mydeahttps://github.com/mydea
force-pushedhttps://github.com/getsentry/sentry-javascript/compare/d681d6d14157a6fc7f1454e8fa8b03fb25f2ce12..57efea872805fb6fb02a1faf3582428d2f3552be
d681d6dhttps://github.com/getsentry/sentry-javascript/commit/d681d6d14157a6fc7f1454e8fa8b03fb25f2ce12
57efea8https://github.com/getsentry/sentry-javascript/commit/57efea872805fb6fb02a1faf3582428d2f3552be
Compare https://github.com/getsentry/sentry-javascript/compare/d681d6d14157a6fc7f1454e8fa8b03fb25f2ce12..57efea872805fb6fb02a1faf3582428d2f3552be
April 20, 2023 07:53https://github.com/getsentry/sentry-javascript/pull/7875#event-9054244849
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
Apr 20, 2023 https://github.com/getsentry/sentry-javascript/pull/7875#pullrequestreview-1393421093
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/7875/files/57efea872805fb6fb02a1faf3582428d2f3552be
https://github.com/mydea
mydeahttps://github.com/mydea
100369ehttps://github.com/getsentry/sentry-javascript/commit/100369e6a52ecf435709ab70bf53d1018ce2d793
Apr 20, 2023https://github.com/getsentry/sentry-javascript/pull/7875#event-9055161668
https://github.com/mydea
mydeahttps://github.com/mydea
April 20, 2023 09:27https://github.com/getsentry/sentry-javascript/pull/7875#event-9055161873
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F7875
https://github.com/billyvg
billyvg https://github.com/billyvg
https://github.com/getsentry/sentry-javascript/pull/7875/files/6c34d3ab97457be20475852164c7e9d1d570152e
https://github.com/Lms24
Lms24 https://github.com/Lms24
https://github.com/getsentry/sentry-javascript/pull/7875/files/6c34d3ab97457be20475852164c7e9d1d570152e
https://github.com/lforst
lforst https://github.com/lforst
https://github.com/AbhiPrasad
AbhiPrasad https://github.com/AbhiPrasad
https://github.com/getsentry/sentry-javascript/pull/7875/files/57efea872805fb6fb02a1faf3582428d2f3552be
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/mydea
mydea https://github.com/mydea
Add truncation to request/response bodies https://github.com/getsentry/sentry-javascript/issues/7531
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/7875
https://github.com/mydea
https://github.com/billyvg
https://github.com/Lms24
https://github.com/AbhiPrasad
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.