Skip to content

feat(effect)!: Rename exports and add layers for tracing and logs - #26731

Merged
JPeer264 merged 5 commits into
developfrom
jp/effect-drop-name-prefixes
Nov 24, 2026
Merged

JPeer264 merged 5 commits into
developfrom
jp/effect-drop-name-prefixes

Conversation

@JPeer264

@JPeer264 JPeer264 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

This renames the @sentry/effect exports to Effect's naming style and turns the tracer and the logger into layers, so the setup is the same for Effect v3 and v4. The old names are removed.

Old New
Sentry.effectLayer Sentry.layer
Layer.setTracer(Sentry.SentryEffectTracer) (v3), Layer.succeed(Tracer.Tracer, Sentry.SentryEffectTracer) (v4) Sentry.layerTracer
Logger.replace(Logger.defaultLogger, Sentry.SentryEffectLogger) (v3), Logger.layer([Sentry.SentryEffectLogger]) (v4) Sentry.layerLogger
Sentry.SentryEffectMetricsLayer Sentry.layerMetrics
Sentry.SentryEffectExternalSpanLayer Sentry.layerExternalSpan
import * as Sentry from '@sentry/effect';
import { Layer } from 'effect';

const SentryLayer = Layer.mergeAll(
  Sentry.layer({ dsn: '__DSN__', tracesSampleRate: 1.0 }),
  Sentry.layerTracer,
  Sentry.layerLogger,
  Sentry.layerMetrics,
);

Why

The Effect team recommended these names: layer is how Effect modules name their main layer, and Effect names its other layers layer… (for example OtlpSerialization.layerJson). A raw Sentry.Logger export would differ from Sentry.logger (the Sentry logs API) only in the case of the first letter.

Logger decisions

Sentry.layerLogger adds the Sentry logger to the loggers in place, so Effect still logs to the console. The alternative is to replace the console logger, as the old docs did.

Known issues

  • On Effect v4, Layer.mergeAll keeps only one of two layers that add a logger, for example Sentry.layerLogger and OtlpLogger.layer. Stack them with Layer.provideMerge instead. Effect's own logger layers behave the same.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 1f33983 (PR test merge using develop at a0df3cb)

Against: a0df3cb (develop) · base run #67668

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.54 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.6 kB - -
@sentry/browser (incl. Tracing) 53.67 kB - -
@sentry/browser (incl. Tracing Core) 40.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.67 kB - -
@sentry/browser (incl. Tracing, Profiling) 56.57 kB - -
@sentry/browser (incl. Tracing, Replay) 93.54 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.41 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.93 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.45 kB - -
@sentry/browser (incl. Feedback) 48.49 kB - -
@sentry/browser (incl. sendFeedback) 31.11 kB - -
@sentry/browser (incl. FeedbackAsync) 36.17 kB - -
@sentry/browser (incl. Metrics) 31.86 kB - -
@sentry/browser (incl. Logs) 32.13 kB - -
@sentry/browser (incl. Metrics & Logs) 32.8 kB - -
@sentry/react 32.56 kB - -
@sentry/react (incl. Tracing) 56.38 kB - -
@sentry/vue 38.75 kB - -
@sentry/vue (incl. Tracing) 56.68 kB - -
@sentry/svelte 30.57 kB - -
@sentry/effect (client) 42.25 kB - -
@sentry/effect (client, incl. Tracing) 54.97 kB +11.26% +5.56 kB 🔺
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.35 kB +11.9% +7.05 kB 🔺
@sentry/remix (Remix 3 client bundle) 59.39 kB - -
CDN Bundle 32.54 kB - -
CDN Bundle (incl. Tracing) 54.15 kB - -
CDN Bundle (incl. Logs, Metrics) 35.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.63 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.16 kB - -
CDN Bundle (incl. Tracing, Replay) 91.89 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.43 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.35 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.81 kB - -
CDN Bundle - uncompressed 94.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.26 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.88 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.54 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300.09 kB - -
@sentry/nextjs (client) 60.09 kB - -
@sentry/sveltekit (client) 55.03 kB - -
@sentry/core/server 45.86 kB - -
@sentry/core/browser 14.46 kB - -
@sentry/node 156.27 kB +0.01% +1 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.45 kB - -
@sentry/node - without tracing 89.22 kB -0.01% -5 B 🔽
@sentry/node - without channel injection 145.2 kB -0.01% -3 B 🔽
@sentry/aws-serverless 99.86 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 210.53 kB - -
@sentry/cloudflare (withSentry) 488.9 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 213.48 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 235.77 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 2 not successful, 67 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Failing after 1m Details
❌ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Failing after 1m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E express-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E express-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E express-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 27s Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 46s Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps enabled by Sentry) Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 40s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 27s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (no upload) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 25s Details
✅ CI: Optional E2E Tests / E2E solid-2-ssr (cloudflare) Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Successful in 25s Details
✅ CI: Optional E2E Tests / E2E nuxt-4-sourcemaps (Vite server) Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 34s Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 46s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 40s Details

@JPeer264
JPeer264 added this pull request to stack #26733 November 22, 2026 16:06
@JPeer264
JPeer264 force-pushed the jp/effect-drop-name-prefixes branch from 0a02c8c to e876c60 Compare November 22, 2026 16:31
@JPeer264
JPeer264 force-pushed the jp/effect-error-reporter-bundle-size branch 2 times, most recently from 872247d to f66aad6 Compare November 23, 2026 10:28
@JPeer264
JPeer264 removed this pull request from stack #26733 November 23, 2026 10:37
Base automatically changed from jp/effect-error-reporter-bundle-size to develop November 23, 2026 12:04
@JPeer264 JPeer264 changed the title feat(effect)!: Drop the Sentry and Effect prefixes from exports feat(effect)!: Rename exports and add layers for tracing and logs Nov 23, 2026
@JPeer264
JPeer264 force-pushed the jp/effect-drop-name-prefixes branch from f4391a2 to e3803af Compare November 23, 2026 14:33
@github-actions

Copy link
Copy Markdown
Contributor

One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check.

@JPeer264
JPeer264 marked this pull request as ready for review November 24, 2026 07:31
@JPeer264 JPeer264 self-assigned this Nov 24, 2026
@JPeer264
JPeer264 requested review from andreiborza and removed request for chargome and s1gr1d November 24, 2026 07:31
JPeer264 and others added 5 commits November 24, 2026 08:34
Rename `effectLayer` to `layer`, `SentryEffectTracer` to `Tracer`,
`SentryEffectLogger` to `Logger`, `SentryEffectMetricsLayer` to
`metricsLayer` and `SentryEffectExternalSpanLayer` to `externalSpanLayer`,
so the exports read like an Effect module under `import * as Sentry`.
Layer values are camelCase, as in Effect's own API
(`Metric.enableRuntimeMetricsLayer`). The old names are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/effect-drop-name-prefixes branch from e3803af to 7c0c56b Compare November 24, 2026 07:37

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, but why break this mid-major? We should add deprecation warnings to the old ones and re-export both.

@nicohrubec

Copy link
Copy Markdown
Member

@andreiborza the effect sdk is still in alpha so should be fine?

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@nicohrubec right, just talked to @JPeer264 too about this. Makes sense to me.

@JPeer264
JPeer264 merged commit b365f05 into develop Nov 24, 2026
479 of 481 checks passed
@JPeer264
JPeer264 deleted the jp/effect-drop-name-prefixes branch November 24, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants