René's URL Explorer Experiment


Title: feat(core): Truncate request messages in AI integrations by RulaKhaled · Pull Request #17921 · getsentry/sentry-javascript · GitHub

Open Graph Title: feat(core): Truncate request messages in AI integrations by RulaKhaled · Pull Request #17921 · getsentry/sentry-javascript

X Title: feat(core): Truncate request messages in AI integrations by RulaKhaled · Pull Request #17921 · getsentry/sentry-javascript

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

Open Graph Description: Fixes: #17809 Implements message truncation logic that drops oldest messages first until the payload fits within the 20KB limit. If a single message exceeds the limit, its content is truncated from...

X Description: Fixes: #17809 Implements message truncation logic that drops oldest messages first until the payload fits within the 20KB limit. If a single message exceeds the limit, its content is truncated from...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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:c21b5647-ecb0-d924-d24b-a7ee3dd0444f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8DD0:3E863D:4E0E7:69E0C:6B04AE3D
html-safe-noncec968c21128b6da8eeedb6289346de84874206729898788a01467c7a230c1d4d0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REQwOjNFODYzRDo0RTBFNzo2OUUwQzo2QjA0QUUzRCIsInZpc2l0b3JfaWQiOiIxOTY4NTU2ODkyNzkyMDczNzg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac677b5e2c920c36be56e3f05abca25ef4a5978f53bdceefc2b1242f6ac6695a84
hovercard-subject-tagpull_request:2910518270
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/17921/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/21479be484e628613cfcd68b4589ac9cb180821b2f62a4e6864f59041e09b63e/getsentry/sentry-javascript/pull/17921
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/21479be484e628613cfcd68b4589ac9cb180821b2f62a4e6864f59041e09b63e/getsentry/sentry-javascript/pull/17921
og:image:altFixes: #17809 Implements message truncation logic that drops oldest messages first until the payload fits within the 20KB limit. If a single message exceeds the limit, its content is truncated from...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRulaKhaled
hostnamegithub.com
expected-hostnamegithub.com
Nonef1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1
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
releaseffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/pull/17921#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F17921
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%2F17921
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/17921
Reloadhttps://github.com/getsentry/sentry-javascript/pull/17921
Reloadhttps://github.com/getsentry/sentry-javascript/pull/17921
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues333 (333)https://github.com/getsentry/sentry-javascript/issues
Pull requests52 (52)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
RulaKhaledhttps://github.com/RulaKhaled
develophttps://github.com/getsentry/sentry-javascript/tree/develop
genai-msg-limithttps://github.com/getsentry/sentry-javascript/tree/genai-msg-limit
Conversationhttps://github.com/getsentry/sentry-javascript/pull/17921
Commits10 (10)https://github.com/getsentry/sentry-javascript/pull/17921/commits
Checkshttps://github.com/getsentry/sentry-javascript/pull/17921/checks
Files changedhttps://github.com/getsentry/sentry-javascript/pull/17921/files
feat(core): Truncate request messages in AI integrationshttps://github.com/getsentry/sentry-javascript/pull/17921#top
RulaKhaledhttps://github.com/RulaKhaled
develophttps://github.com/getsentry/sentry-javascript/tree/develop
genai-msg-limithttps://github.com/getsentry/sentry-javascript/tree/genai-msg-limit
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
Oct 13, 2025https://github.com/getsentry/sentry-javascript/pull/17921#issue-3510372050
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
#17809https://github.com/getsentry/sentry-javascript/issues/17809
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/RulaKhaled
feat(core): Truncate request messages in AI integrationshttps://github.com/getsentry/sentry-javascript/pull/17921/commits/0334ebf692353480d3f2777285f79be021a9a441
0334ebfhttps://github.com/getsentry/sentry-javascript/pull/17921/commits/0334ebf692353480d3f2777285f79be021a9a441
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
Oct 13, 2025 https://github.com/getsentry/sentry-javascript/pull/17921#ref-pullrequest-3484529395
feat(core): Add byte size limit and oldest first truncation for gen_ai messages #17863 https://github.com/getsentry/sentry-javascript/pull/17863
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F17921
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
October 13, 2025 14:56https://github.com/getsentry/sentry-javascript/pull/17921#event-20249481254
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Oct 13, 2025https://github.com/getsentry/sentry-javascript/pull/17921#issuecomment-3397891815
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
View base workflow runhttps://github.com/getsentry/sentry-javascript/actions/runs/18685070759
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Oct 13, 2025https://github.com/getsentry/sentry-javascript/pull/17921#issuecomment-3397898568
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
View base workflow runhttps://github.com/getsentry/sentry-javascript/actions/runs/18685070759
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
RulaKhaledhttps://github.com/RulaKhaled
October 13, 2025 17:46https://github.com/getsentry/sentry-javascript/pull/17921#commits-pushed-bf8e812
https://github.com/RulaKhaled
update truncationhttps://github.com/getsentry/sentry-javascript/pull/17921/commits/bf8e8124648fdc9b27c6b03007fa2c4d59d8fa22
bf8e812https://github.com/getsentry/sentry-javascript/pull/17921/commits/bf8e8124648fdc9b27c6b03007fa2c4d59d8fa22
https://github.com/RulaKhaled
lint yelling:https://github.com/getsentry/sentry-javascript/pull/17921/commits/a1bd5360ede9dbec5a08c8b77706b73a8cffd113
a1bd536https://github.com/getsentry/sentry-javascript/pull/17921/commits/a1bd5360ede9dbec5a08c8b77706b73a8cffd113
https://github.com/RulaKhaled
update with nicer formathttps://github.com/getsentry/sentry-javascript/pull/17921/commits/94a72d5af4f5648efa81fa6271a62a162a8e191d
94a72d5https://github.com/getsentry/sentry-javascript/pull/17921/commits/94a72d5af4f5648efa81fa6271a62a162a8e191d
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
October 20, 2025 08:04https://github.com/getsentry/sentry-javascript/pull/17921#event-20374128626
https://github.com/RulaKhaled
Merge branch 'develop' into genai-msg-limithttps://github.com/getsentry/sentry-javascript/pull/17921/commits/8aa24f8b569f952235c89c6c3869026924265c84
8aa24f8https://github.com/getsentry/sentry-javascript/pull/17921/commits/8aa24f8b569f952235c89c6c3869026924265c84
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
JPeer264https://github.com/JPeer264
andreiborzahttps://github.com/andreiborza
October 20, 2025 11:04https://github.com/getsentry/sentry-javascript/pull/17921#event-20377706486
RulaKhaledhttps://github.com/RulaKhaled
October 21, 2025 14:36https://github.com/getsentry/sentry-javascript/pull/17921#commits-pushed-ea474d5
https://github.com/RulaKhaled
Merge branch 'develop' into genai-msg-limithttps://github.com/getsentry/sentry-javascript/pull/17921/commits/ea474d522dc21fc2204b6d78adfda80cd41abd30
ea474d5https://github.com/getsentry/sentry-javascript/pull/17921/commits/ea474d522dc21fc2204b6d78adfda80cd41abd30
https://github.com/RulaKhaled
Merge branch 'develop' into genai-msg-limithttps://github.com/getsentry/sentry-javascript/pull/17921/commits/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e
0ef32bfhttps://github.com/getsentry/sentry-javascript/pull/17921/commits/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e
https://github.com/JPeer264
JPeer264https://github.com/JPeer264
Oct 21, 2025 https://github.com/getsentry/sentry-javascript/pull/17921#pullrequestreview-3361097635
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/17921/files/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e
packages/core/src/utils/google-genai/index.tshttps://github.com/getsentry/sentry-javascript/pull/17921/files/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e#diff-d4c60558e68402a5f30ae48cd06b846fcbb674cc59a040dc07dfa4fe09b96820
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
packages/core/src/utils/vercel-ai/index.tshttps://github.com/getsentry/sentry-javascript/pull/17921/files/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e#diff-c1d16200c7a833bf40d483215aa6e1e022ddf29ba3a287117da4cf474cde94d5
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
packages/core/src/utils/ai/messageTruncation.tshttps://github.com/getsentry/sentry-javascript/pull/17921/files/0ef32bf5a4ca56e4a9ff1a444ac0dfd3a1b77e2e#diff-4d4852fafebd4757cfd5c265e5f2cd1ee63842a1e93e6c6f0e15ef712c8319d1
JPeer264https://github.com/JPeer264
Oct 21, 2025https://github.com/getsentry/sentry-javascript/pull/17921#discussion_r2448562128
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
RulaKhaledhttps://github.com/RulaKhaled
Oct 21, 2025https://github.com/getsentry/sentry-javascript/pull/17921#discussion_r2448591102
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoderhttps://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
JPeer264https://github.com/JPeer264
Oct 21, 2025https://github.com/getsentry/sentry-javascript/pull/17921#discussion_r2448654221
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://developer.mozilla.org/en-US/docs/Web/API/TextEncoderhttps://developer.mozilla.org/en-US/docs/Web/API/TextEncoder
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/RulaKhaled
refactor duplicate codehttps://github.com/getsentry/sentry-javascript/pull/17921/commits/8faecc8510a58ede90efbbf9227924ec014d5ffb
8faecc8https://github.com/getsentry/sentry-javascript/pull/17921/commits/8faecc8510a58ede90efbbf9227924ec014d5ffb
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
JPeer264https://github.com/JPeer264
October 21, 2025 14:49https://github.com/getsentry/sentry-javascript/pull/17921#event-20407217691
https://github.com/JPeer264
JPeer264https://github.com/JPeer264
Oct 21, 2025 https://github.com/getsentry/sentry-javascript/pull/17921#pullrequestreview-3361244818
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/17921/files/8faecc8510a58ede90efbbf9227924ec014d5ffb
JPeer264https://github.com/JPeer264
https://github.com/getsentry/sentry-javascript/pull/17921#pullrequestreview-3361244818
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
RulaKhaledhttps://github.com/RulaKhaled
October 21, 2025 17:33https://github.com/getsentry/sentry-javascript/pull/17921#commits-pushed-aa64b94
https://github.com/RulaKhaled
handle stringified objects toohttps://github.com/getsentry/sentry-javascript/pull/17921/commits/aa64b94e746a1ce7664e49fa8056de6090a5c581
aa64b94https://github.com/getsentry/sentry-javascript/pull/17921/commits/aa64b94e746a1ce7664e49fa8056de6090a5c581
https://github.com/RulaKhaled
fix testhttps://github.com/getsentry/sentry-javascript/pull/17921/commits/eda8ec00ec7c64b493d5033731cacf7e699be443
eda8ec0https://github.com/getsentry/sentry-javascript/pull/17921/commits/eda8ec00ec7c64b493d5033731cacf7e699be443
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
Oct 21, 2025 https://github.com/getsentry/sentry-javascript/pull/17921#pullrequestreview-3361532735
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/17921/files/eda8ec00ec7c64b493d5033731cacf7e699be443
packages/core/src/utils/ai/utils.tshttps://github.com/getsentry/sentry-javascript/pull/17921/files/eda8ec00ec7c64b493d5033731cacf7e699be443#diff-65ac0045cf1a4ea020b0b85805f0d0c5353be011540c5a8f792113de774a69cf
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
718a3eahttps://github.com/getsentry/sentry-javascript/commit/718a3eab491068a32c2b8d2eb2794699330a8336
Oct 21, 2025https://github.com/getsentry/sentry-javascript/pull/17921#event-20409100359
https://github.com/RulaKhaled
RulaKhaledhttps://github.com/RulaKhaled
October 21, 2025 16:08https://github.com/getsentry/sentry-javascript/pull/17921#event-20409101053
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Oct 24, 2025 https://github.com/getsentry/sentry-javascript/pull/17921#ref-issue-3464521735
Implement Byte Size Limit and Oldest First Truncation for gen_ai.*.messages #17809 https://github.com/getsentry/sentry-javascript/issues/17809
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%2F17921
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-javascript/pull/17921/files/eda8ec00ec7c64b493d5033731cacf7e699be443
https://github.com/JPeer264
JPeer264 https://github.com/JPeer264
https://github.com/getsentry/sentry-javascript/pull/17921/files/8faecc8510a58ede90efbbf9227924ec014d5ffb
https://github.com/andreiborza
andreiborza https://github.com/andreiborza
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
Implement Byte Size Limit and Oldest First Truncation for gen_ai.*.messages https://github.com/getsentry/sentry-javascript/issues/17809
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/17921
https://github.com/RulaKhaled
https://github.com/JPeer264
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.