Skip to content

feat(effect): Add base skaffolding for Effect.ts#19622

Merged
JPeer264 merged 7 commits intojp/add-effect-sdkfrom
jp/add-effect-sdk-stack/1
Mar 5, 2026
Merged

feat(effect): Add base skaffolding for Effect.ts#19622
JPeer264 merged 7 commits intojp/add-effect-sdkfrom
jp/add-effect-sdk-stack/1

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Mar 4, 2026

This is one of many PRs to create the effect SDK. Once this has been merged I will open the draft PR for the effect sdk and create the plan in there.

(the almost final SDK can be viewed here: https://github.com/getsentry/sentry-javascript/tree/jp/effect-sdk. It might be that some specifics change, especially when having browser + server split, and with tracing)


This PR focuses on the base skaffolding of @sentry/effect. This on its own is not really doing anything except setting up the skaffold. The README already reflects the actual usage, while the export doesn't exist yet, this will come in another PR (also init is exposed here, just for the sake of completeness)

@JPeer264 JPeer264 requested review from andreiborza and s1gr1d March 4, 2026 08:30
@JPeer264 JPeer264 self-assigned this Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 11,491 - - added
GET With Sentry 1,876 16% - added
GET With Sentry (error only) 7,662 67% - added
POST Baseline 1,181 - - added
POST With Sentry 577 49% - added
POST With Sentry (error only) 1,028 87% - added
MYSQL Baseline 3,936 - - added
MYSQL With Sentry 597 15% - added
MYSQL With Sentry (error only) 3,251 83% - added


const MainLive = HttpLive.pipe(
Layer.provide(
Sentry.effectLayer({
Copy link
Member

Choose a reason for hiding this comment

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

Do we export effectLayer? I only see init getting exported 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

The README already reflects the actual usage, while the export doesn't exist yet, this will come in another PR (also init is exposed here, just for the sake of completeness)

This will be added in later steps.

}),
transport: options.transport,
};

Copy link
Member

Choose a reason for hiding this comment

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

Don't forget to call applySdkMetadata with the needed arguments here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed sdk.ts entirely, as we don't need it.

@JPeer264 JPeer264 force-pushed the jp/add-effect-sdk-stack/1 branch from 04bb301 to 86f7209 Compare March 4, 2026 11:00
setMeasurement,
getSpanStatusFromHttpCode,
setHttpStatus,
} from '@sentry/core';
Copy link

Choose a reason for hiding this comment

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

Missing init export despite PR description claiming inclusion

Medium Severity

The PR description explicitly states "also init is exposed here, just for the sake of completeness" but init is neither defined nor exported anywhere in packages/effect/src/index.ts. Every other SDK package in this repo (nestjs, bun, svelte, react, etc.) defines its own init function that wraps initAndBind from @sentry/core and calls applySdkMetadata. Neither init nor applySdkMetadata exists in this package. A reviewer also flagged the missing applySdkMetadata call.

Fix in Cursor Fix in Web

@@ -0,0 +1,52 @@
# Sentry Effect SDK
Copy link
Member

Choose a reason for hiding this comment

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

l: Let's mark this alpha and follow our general structure for READMEs, e.g. https://github.com/getsentry/sentry-javascript/blob/develop/packages/tanstackstart-react/README.md#official-sentry-sdk-for-tanstack-start-react-alpha

And let's also add the notice below regarding potential breaking changes. Unlike our tss readme, I'd use Github's proper announcement boxes.

Copy link
Member Author

Choose a reason for hiding this comment

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

great suggestion, changed

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.

[![npm dm](https://img.shields.io/npm/dm/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect)
[![npm dt](https://img.shields.io/npm/dt/@sentry/effect.svg)](https://www.npmjs.com/package/@sentry/effect)

> NOTICE: This package is in alpha state and may be subject to breaking changes.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> NOTICE: This package is in alpha state and may be subject to breaking changes.
> [!IMPORTANT]
> This package is in alpha state and may be subject to breaking changes.

@JPeer264 JPeer264 force-pushed the jp/add-effect-sdk-stack/1 branch from 4148383 to 7e9e7c2 Compare March 5, 2026 09:03
@JPeer264 JPeer264 merged commit 65cced9 into jp/add-effect-sdk Mar 5, 2026
218 of 220 checks passed
@JPeer264 JPeer264 deleted the jp/add-effect-sdk-stack/1 branch March 5, 2026 09:48
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.

3 participants