-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(flags): Adds Growthbook integration #17440
Conversation
@Lms24 Would you approve the workflows to run again?
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?
relates to getsentry/sentry#82157
packages/browser/src/integrations/featureFlags/growthbook/integration.ts
Outdated
Show resolved
Hide resolved
Changes lgtm but could use a review from the js experts for safety! I'm fine with node support getting added in a followup
packages/browser/src/integrations/featureFlags/growthbook/integration.ts
Outdated
Show resolved
Hide resolved
packages/browser/src/integrations/featureFlags/growthbook/integration.ts
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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?
@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?
Besides CI failures changes lgtm! Would look to @chargome or @AbhiPrasad for a final review. Tysm for adding node support and tests too!
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
dev-packages/node-integration-tests/suites/featureFlags/growthbook/onError/basic/scenario.ts
Outdated
Show resolved
Hide resolved
dev-packages/node-integration-tests/suites/featureFlags/growthbook/onSpan/scenario.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
6e459ee
to
e1379ca
Compare
@AbhiPrasad do you mind taking a look at this?
Uh oh!
There was an error while loading. Please reload this page.
Adds GrowthBook's integration for tracking feature evaluations.
This PR includes changes to wrap
isOn
, getFeatureValue andevalFeature
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.growthbookIntegration
: WrapsisOn
/getFeatureValue
to capture boolean results; inserts into active span attributes and copies to error events via scope.@sentry/core
feature flags exports.growthbookIntegration
.growthbookIntegration
.onError
(buffer eviction, updates, boolean-only capture, scope isolation) andonSpan
(attributes on span end, per-span cap).onError
andonSpan
; add@growthbook/growthbook
test dependency.Written by Cursor Bugbot for commit 8fe30ac. This will update automatically on new commits. Configure here.