Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(flags): Adds Growthbook integration #17440

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

Open
madhuchavva wants to merge 23 commits into getsentry:develop
base: develop
Choose a base branch
Loading
from madhuchavva:feat/growthbook-integration

Conversation

Copy link

@madhuchavva madhuchavva commented Aug 21, 2025
edited by cursor bot
Loading

Adds GrowthBook's integration for tracking feature evaluations.

This PR includes changes to wrap isOn, getFeatureValue and evalFeature methods, record results of type (booleans, strings, numbers, null, objects/arrays) and attach them to active span or current scope buffer for errors.

Closes https://linear.app/getsentry/issue/REPLAY-728/add-growthbook-feature-flag-integrations


Note

Adds GrowthBook integration that captures boolean feature evaluations via isOn/getFeatureValue to spans and error events, and exports it across SDKs with browser/node tests.

  • Core:
    • New growthbookIntegration: Wraps isOn/getFeatureValue to capture boolean results; inserts into active span attributes and copies to error events via scope.
    • Exposed from @sentry/core feature flags exports.
  • Runtimes/Frameworks:
    • Browser/Node: Add runtime adapter/shim and re-export growthbookIntegration.
    • SDK re-exports: Astro, AWS Serverless, Bun, Cloudflare, Google Cloud Serverless, Next.js (types), Nuxt (types), Remix (types), React Router (types), SolidStart (types), SvelteKit (types), TanStack Start (types) now expose growthbookIntegration.
  • Tests:
    • Browser integration tests: onError (buffer eviction, updates, boolean-only capture, scope isolation) and onSpan (attributes on span end, per-span cap).
    • Node integration tests: Scenarios validating onError and onSpan; add @growthbook/growthbook test dependency.

Written by Cursor Bugbot for commit 8fe30ac. This will update automatically on new commits. Configure here.

seer-by-sentry[bot] reacted with hooray emoji
@madhuchavva madhuchavva changed the title (削除) Feat/growthbook integration (削除ここまで) (追記) feat(flags): Adds Growthbook integration (追記ここまで) Aug 21, 2025
@madhuchavva madhuchavva marked this pull request as ready for review August 21, 2025 23:14
@Lms24 Lms24 requested a review from aliu39 August 25, 2025 10:45
Copy link
Author

@Lms24 Would you approve the workflows to run again?

aliu39 reacted with thumbs up emoji

Copy link
Member

aliu39 commented Sep 3, 2025

Tysm for the integration @madhuchavva !! Will take a look soon

record results of type (booleans, strings, numbers, null, objects/arrays)

For now Sentry is limiting all FF integrations to boolean only. We plan to rollout non-bool support later - would you mind removing those types from this PR?

madhuchavva reacted with thumbs up emoji

Copy link
Member

aliu39 commented Sep 3, 2025

Copy link
Member

aliu39 commented Sep 15, 2025

Changes lgtm but could use a review from the js experts for safety! I'm fine with node support getting added in a followup

@AbhiPrasad @chargome

cursor[bot]

This comment was marked as outdated.

Copy link
Author

@chargome @aliu39 Thanks for the feedback. Apologies for the delay in getting back(I was off). Please take a look when you can. Thank you!

aliu39 reacted with heart emoji

Copy link
Member

aliu39 commented Sep 24, 2025

Thanks sm for the updates! Just approved tests to run. For server-side, I believe there are a few more pkgs to export from besides node. See https://github.com/getsentry/sentry-javascript/pull/16585/files as a reference -
Screenshot 2025年09月24日 at 2 47 33 PM

To verify it works for node, could we copy tests to dev-packages/node-integration-tests/ as well?

madhuchavva reacted with thumbs up emoji

Copy link
Author

@aliu39 Per your comments, I added node integration tests and exports for server side packages. Do you mind approving again to let the tests run?

aliu39 reacted with thumbs up emoji

Copy link
Member

aliu39 commented Sep 26, 2025
edited
Loading

Besides CI failures changes lgtm! Would look to @chargome or @AbhiPrasad for a final review. Tysm for adding node support and tests too!

madhuchavva reacted with thumbs up emoji

cursor[bot]

This comment was marked as outdated.

@chargome chargome self-assigned this Sep 26, 2025
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

LGTM now! Something is still off with the yarn lockfile it seems, feel free to ping me if I should take this PR over

madhuchavva and aliu39 reacted with heart emoji
@chargome chargome force-pushed the feat/growthbook-integration branch from 6e459ee to e1379ca Compare October 1, 2025 13:11
Copy link
Author

@AbhiPrasad do you mind taking a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@aliu39 aliu39 aliu39 left review comments

@cursor cursor[bot] cursor[bot] left review comments

@chargome chargome chargome approved these changes

@AbhiPrasad AbhiPrasad Awaiting requested review from AbhiPrasad

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /