Title: Client always bundles log/metric flush code · Issue #26145 · getsentry/sentry-javascript · GitHub
Open Graph Title: Client always bundles log/metric flush code · Issue #26145 · getsentry/sentry-javascript
X Title: Client always bundles log/metric flush code · Issue #26145 · getsentry/sentry-javascript
Description: The Client constructor in packages/core/src/client.ts (L318–327) always calls setupWeightBasedFlushing for both logs and metrics. That statically pulls _INTERNAL_flushLogsBuffer / _INTERNAL_flushMetricsBuffer, the log and metric envelope...
Open Graph Description: The Client constructor in packages/core/src/client.ts (L318–327) always calls setupWeightBasedFlushing for both logs and metrics. That statically pulls _INTERNAL_flushLogsBuffer / _INTERNAL_flushMe...
X Description: The Client constructor in packages/core/src/client.ts (L318–327) always calls setupWeightBasedFlushing for both logs and metrics. That statically pulls _INTERNAL_flushLogsBuffer / _INTERNAL_flushMe...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26145
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Client always bundles log/metric flush code","articleBody":"The `Client` constructor in `packages/core/src/client.ts` (L318–327) always calls `setupWeightBasedFlushing` for both logs and metrics. That statically pulls `_INTERNAL_flushLogsBuffer` / `_INTERNAL_flushMetricsBuffer`, the log and metric envelope builders, and the size estimators into every bundle, even when an app never captures a log or metric.\n\n- Measured with esbuild 0.27.7 (minify, ESM, platform browser, `__SENTRY_DEBUG__: false`) on a tracing-only setup (`BrowserClient` + `browserTracingIntegration`, `setCurrentClient`, `client.init()`): **2,068 B raw / 445 B br-11** of this code (131,185 B raw total).\n- Related but different: #20206 and #19171 are about the flush timers' runtime behavior.\n\n\u003c!-- junior-request-attribution:start -->\nvia @BYK.\n\u003c!-- junior-request-attribution:end -->\n\n\u003c!-- junior-session-footer:start -->\n\u003c!-- junior-conversation-id:agent%3Aced2e9146c6143efef718a62effeb4d1 -->\n\n--\n\n[View Session in Sentry](https://sentry.sentry.io/explore/conversations/agent%3Aced2e9146c6143efef718a62effeb4d1/?project=4510944073809921)\n\n\u003c!-- junior-session-footer:end -->","author":{"url":"https://github.com/apps/sentry-junior","@type":"Person","name":"sentry-junior"},"datePublished":"2026-11-05T13:32:28Z","url":"https://github.com/getsentry/sentry-javascript/issues/26145"}
| react-profiling | 0 |
| react-import-map | react,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/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8f4d3b14-9c11-2ca2-c47d-1cf7ec559657 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83F8:18CB59:5E8AB8:80AF86:6B04C8E9 |
| html-safe-nonce | 46de206c7ed6a20a2733e38c99f820a573bb9d8a5495850292db93d21082aee1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0Y4OjE4Q0I1OTo1RThBQjg6ODBBRjg2OjZCMDRDOEU5IiwidmlzaXRvcl9pZCI6IjIzMzg5NTEwMzI2OTgzNTc5OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 01742a0cc6659a98a0d66d89c1813434b05920b8e9f68cae1fbcd587d0f8d0b0 |
| hovercard-subject-tag | issue:6224198360 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/26145/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8cb1776c41b159dcc64c5e45fca0daa8c691ed0ff21d1753c37ca923cb3bcd5b/getsentry/sentry-javascript/issues/26145 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8cb1776c41b159dcc64c5e45fca0daa8c691ed0ff21d1753c37ca923cb3bcd5b/getsentry/sentry-javascript/issues/26145 |
| og:image:alt | The Client constructor in packages/core/src/client.ts (L318–327) always calls setupWeightBasedFlushing for both logs and metrics. That statically pulls _INTERNAL_flushLogsBuffer / _INTERNAL_flushMe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sentry-junior[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width