Skip to content

feat(flags): add node support for generic featureFlagsIntegration and move utils to core #16585

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 36 commits into from
Jun 17, 2025

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Jun 15, 2025

The featureFlagsIntegration is an integration to manually buffer feature flags on evaluation, and capture them in event contexts and span attributes. This PR moves it from browser to core, as well as the shared functionality/utils of all FF integrations (no browser specific logic).

Browser exports and functionality is unchanged. Per @AbhiPrasad 's recommendation I've manually exported the integration in all the packages zodErrorsIntegration is exported. Note many backend pkgs use a wildcard (*) export from node.

TODO:

  • add node-integration-tests
  • update platform docs

Part of

@aliu39 aliu39 changed the title Aliu/move ffs to core feat(flags): add node support for generic featureFlagsIntegration and move utils to core Jun 15, 2025
Copy link
Contributor

github-actions bot commented Jun 15, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.99 kB - -
@sentry/browser - with treeshaking flags 23.76 kB - -
@sentry/browser (incl. Tracing) 38.79 kB - -
@sentry/browser (incl. Tracing, Replay) 76.92 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 81.68 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 93.75 kB - -
@sentry/browser (incl. Feedback) 40.73 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 40.78 kB - -
@sentry/vue 28.36 kB - -
@sentry/vue (incl. Tracing) 40.66 kB - -
@sentry/svelte 24.01 kB - -
CDN Bundle 25.48 kB - -
CDN Bundle (incl. Tracing) 38.96 kB - -
CDN Bundle (incl. Tracing, Replay) 74.81 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.23 kB - -
CDN Bundle - uncompressed 74.48 kB - -
CDN Bundle (incl. Tracing) - uncompressed 115.3 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 229.35 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 242.18 kB - -
@sentry/nextjs (client) 42.44 kB - -
@sentry/sveltekit (client) 39.28 kB - -
@sentry/node 150.76 kB - -
@sentry/node - without tracing 98.52 kB - -
@sentry/aws-serverless 124.27 kB -0.01% -1 B 🔽

View base workflow run

@aliu39 aliu39 marked this pull request as ready for review June 16, 2025 16:45
@aliu39 aliu39 requested a review from chargome June 16, 2025 18:43
@@ -1,11 +1,11 @@
import { expect } from '@playwright/test';
import { _INTERNAL_FLAG_BUFFER_SIZE as FLAG_BUFFER_SIZE } from '@sentry/core';
Copy link
Member

Choose a reason for hiding this comment

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

Is this _INTERNAL pattern common in the codebase?

Copy link
Member

Choose a reason for hiding this comment

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

It is starting with logs - we don't really have a better way to do this because of the way @sentry/core is structured atm.

We could do subpath exports, but that breaks horribly for some bundlers (esbuild 😢)

Base automatically changed from aliu/span-flags-v2 to develop June 17, 2025 18:40
@aliu39 aliu39 enabled auto-merge (squash) June 17, 2025 23:04
@aliu39 aliu39 merged commit 468fc8c into develop Jun 17, 2025
778 of 792 checks passed
@aliu39 aliu39 deleted the aliu/move-ffs-to-core branch June 17, 2025 23:13
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.

4 participants