-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(flags): instrument sdk featureFlagsIntegration to track FE flag evals #81954
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
Conversation
static/app/utils/featureFlags.ts
Outdated
* the Sentry SDK, in the event context. If the FeatureFlagsIntegration is not | ||
* installed, the callback is a no-op. | ||
*/ | ||
export function getSentryFeaturesHook(): (name: string, value: unknown) => void { |
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.
This doesn't really hook into anything
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.
wdym? "hook" is the term I'm using to describe the callback taking in a flag name/val. This term is used sometimes in SDK setup code
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.
sorry this is just semantics but you're not really returning a hook, but rather a handler for your hook. the "hook" is when features.includes()
gets called.
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.
ok got it, what if I rename all instances of "hook" to "handler"?
…sentry into aliu/use-js-flags-integration
Bundle ReportChanges will increase total bundle size by 89.16kB (0.28%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
…#14741) This isn't exported in types-hoist/index, but we found users can still import it from a `build/` file. Discussed with @billyvg we don't want users to accidentally import it this way. Note we currently use this type in sentry, until getsentry/sentry#81954 is rolled out.
…vals (#81954) Re-opening https://github.com/getsentry/sentry/pull/81159/files after releasing a custom flag tracking integration in JS SDK 8.43. WIth this integration, we don't need to manage our own buffer in featureObserver anymore. Sentry employees shouldn't notice any changes, this is a proof-of-concept for the new SDK. The SDK has its own tests already, so I'm only unit testing the add(__)FeaturesHook fxs. Manually tested with dev-ui sending to a test org: https://andrew-onboarding.sentry.io/share/issue/664703eb3a98441b8a203dc44e803cee/
Re-opening https://github.com/getsentry/sentry/pull/81159/files after releasing a custom flag tracking integration in JS SDK 8.43. WIth this integration, we don't need to manage our own buffer in featureObserver anymore. Sentry employees shouldn't notice any changes, this is a proof-of-concept for the new SDK.
The SDK has its own tests already, so I'm only unit testing the add(__)FeaturesHook fxs.
Manually tested with dev-ui sending to a test org: https://andrew-onboarding.sentry.io/share/issue/664703eb3a98441b8a203dc44e803cee/