feat(effect): Add base skaffolding for Effect.ts#19622
feat(effect): Add base skaffolding for Effect.ts#19622JPeer264 merged 7 commits intojp/add-effect-sdkfrom
Conversation
size-limit report 📦
|
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.
|
|
|
||
| const MainLive = HttpLive.pipe( | ||
| Layer.provide( | ||
| Sentry.effectLayer({ |
There was a problem hiding this comment.
Do we export effectLayer? I only see init getting exported 🤔
There was a problem hiding this comment.
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.
packages/effect/src/sdk.ts
Outdated
| }), | ||
| transport: options.transport, | ||
| }; | ||
|
|
There was a problem hiding this comment.
Don't forget to call applySdkMetadata with the needed arguments here.
There was a problem hiding this comment.
I removed sdk.ts entirely, as we don't need it.
04bb301 to
86f7209
Compare
| setMeasurement, | ||
| getSpanStatusFromHttpCode, | ||
| setHttpStatus, | ||
| } from '@sentry/core'; |
There was a problem hiding this comment.
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.
packages/effect/README.md
Outdated
| @@ -0,0 +1,52 @@ | |||
| # Sentry Effect SDK | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
great suggestion, changed
Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
There was a problem hiding this comment.
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.
| [](https://www.npmjs.com/package/@sentry/effect) | ||
| [](https://www.npmjs.com/package/@sentry/effect) | ||
|
|
||
| > NOTICE: This package is in alpha state and may be subject to breaking changes. |
There was a problem hiding this comment.
| > 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. |
4148383 to
7e9e7c2
Compare


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 (alsoinitis exposed here, just for the sake of completeness)