Skip to content

feat(effect): Add logging to Sentry.effectLayer#19656

Open
JPeer264 wants to merge 2 commits intojp/add-effect-sdkfrom
jp/add-effect-sdk-stack/4
Open

feat(effect): Add logging to Sentry.effectLayer#19656
JPeer264 wants to merge 2 commits intojp/add-effect-sdkfrom
jp/add-effect-sdk-stack/4

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Mar 5, 2026

This adds the functionality to send logs to Sentry by setting enableLogs: true in the Sentry.effectLayer

@JPeer264 JPeer264 self-assigned this Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.63 kB added added
@sentry/browser - with treeshaking flags 24.13 kB added added
@sentry/browser (incl. Tracing) 42.43 kB added added
@sentry/browser (incl. Tracing, Profiling) 47.09 kB added added
@sentry/browser (incl. Tracing, Replay) 81.25 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.87 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 85.95 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 98.21 kB added added
@sentry/browser (incl. Feedback) 42.44 kB added added
@sentry/browser (incl. sendFeedback) 30.3 kB added added
@sentry/browser (incl. FeedbackAsync) 35.35 kB added added
@sentry/browser (incl. Metrics) 26.8 kB added added
@sentry/browser (incl. Logs) 26.94 kB added added
@sentry/browser (incl. Metrics & Logs) 27.61 kB added added
@sentry/react 27.38 kB added added
@sentry/react (incl. Tracing) 44.77 kB added added
@sentry/vue 30.08 kB added added
@sentry/vue (incl. Tracing) 44.3 kB added added
@sentry/svelte 25.66 kB added added
CDN Bundle 28.17 kB added added
CDN Bundle (incl. Tracing) 43.26 kB added added
CDN Bundle (incl. Logs, Metrics) 29.01 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 44.1 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 68.09 kB added added
CDN Bundle (incl. Tracing, Replay) 80.14 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 85.65 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.53 kB added added
CDN Bundle - uncompressed 82.35 kB added added
CDN Bundle (incl. Tracing) - uncompressed 128.07 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.19 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.9 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.85 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.95 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.77 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.67 kB added added
@sentry/nextjs (client) 47.18 kB added added
@sentry/sveltekit (client) 42.89 kB added added
@sentry/node-core 52.24 kB added added
@sentry/node 174.69 kB added added
@sentry/node - without tracing 97.39 kB added added
@sentry/aws-serverless 113.19 kB added added

Base automatically changed from jp/add-effect-sdk-stack/3 to jp/add-effect-sdk March 6, 2026 15:17
@JPeer264 JPeer264 force-pushed the jp/add-effect-sdk-stack/4 branch from 4ac8fdb to d12dae1 Compare March 6, 2026 15:23
@JPeer264 JPeer264 force-pushed the jp/add-effect-sdk-stack/4 branch from d12dae1 to 751cac1 Compare March 6, 2026 15:24
@JPeer264 JPeer264 requested review from andreiborza and s1gr1d March 6, 2026 15:24
@JPeer264 JPeer264 marked this pull request as ready for review March 6, 2026 15:24
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

expect(sentryCore.logger.info).toHaveBeenCalledWith('Processing: data');
}).pipe(Effect.provide(loggerLayer)),
);
});
Copy link

Choose a reason for hiding this comment

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

Feat PR missing integration or E2E test

Low Severity

This is a feat PR that adds Effect log forwarding to Sentry, but it only includes vitest unit tests. Per the project review rules, feat PRs are expected to include at least one integration or E2E test. The existing tests validate the logger and layer composition well at the unit level, but an integration or E2E test (e.g., in dev-packages/e2e-tests/ or dev-packages/node-integration-tests/) verifying that Effect logs actually arrive as Sentry log entries end-to-end would increase confidence.

Additional Locations (1)

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

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.

2 participants