Skip to content

fix(logs): Ensure logs can be flushed correctly #16216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented May 7, 2025

resolves #16110

Stores the Client to LogBuffer WeakMap onto the global object so logs can be retrieved correctly during flushing. Previously, the WeakMap reference would be different at flush time, causing no logs to be found for any given client.

Adds an express e2e tests to ensure logs are flushed correctly.

Stores the Client to LogBuffer WeakMap onto the global object so logs can be
retrieved correctly during flushing. Previously, the WeakMap reference would be
different at flush time, causing no logs to be found for any given client.

Adds an express e2e tests to ensure logs are flushed correctly.
@andreiborza andreiborza requested review from mydea, Lms24 and AbhiPrasad May 7, 2025 11:32
Copy link
Contributor

github-actions bot commented May 7, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.35 KB +0.03% +7 B 🔺
@sentry/browser - with treeshaking flags 23.19 KB +0.1% +22 B 🔺
@sentry/browser (incl. Tracing) 37.25 KB +0.07% +23 B 🔺
@sentry/browser (incl. Tracing, Replay) 74.47 KB +0.03% +19 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.34 KB +0.03% +17 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 79.12 KB +0.02% +15 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 90.93 KB - -
@sentry/browser (incl. Feedback) 39.75 KB +0.07% +26 B 🔺
@sentry/browser (incl. sendFeedback) 27.98 KB +0.07% +20 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.74 KB +0.06% +20 B 🔺
@sentry/react 25.16 KB +0.11% +26 B 🔺
@sentry/react (incl. Tracing) 39.24 KB +0.05% +17 B 🔺
@sentry/vue 27.63 KB +0.08% +22 B 🔺
@sentry/vue (incl. Tracing) 39.01 KB +0.05% +18 B 🔺
@sentry/svelte 23.38 KB +0.07% +15 B 🔺
CDN Bundle 24.55 KB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing) 37.29 KB -0.03% -9 B 🔽
CDN Bundle (incl. Tracing, Replay) 72.33 KB -0.01% -6 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 77.64 KB +0.03% +17 B 🔺
CDN Bundle - uncompressed 71.62 KB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 110.34 KB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 221.63 KB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 234.15 KB +0.01% +2 B 🔺
@sentry/nextjs (client) 40.84 KB +0.03% +10 B 🔺
@sentry/sveltekit (client) 37.73 KB +0.03% +10 B 🔺
@sentry/node 144.33 KB +0.02% +21 B 🔺
@sentry/node - without tracing 96.21 KB +0.02% +19 B 🔺
@sentry/aws-serverless 120.57 KB +0.02% +13 B 🔺

View base workflow run

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Thanks for investigating this @andreiborza!

@mydea
Copy link
Member

mydea commented May 7, 2025

Could this also be the cause of #15793?

@andreiborza andreiborza merged commit a49c946 into develop May 7, 2025
157 checks passed
@andreiborza andreiborza deleted the ab/fix-logs-flushing branch May 7, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs not fully ingested by Sentry from AWS lambdas
3 participants