Skip to content
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): add Statsig browser integration #15319

Merged
merged 10 commits into from
Feb 8, 2025
Merged

feat(flags): add Statsig browser integration #15319

merged 10 commits into from
Feb 8, 2025

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Feb 6, 2025

Ref https://develop.sentry.dev/sdk/expected-features/#feature-flags. Adds an integration for tracking Statsig js-client flag evaluations, specifically the checkGate method which is used for boolean release flags.

Statsig references:

Our current FF integrations only support boolean flag values so "dynamic config", "experiments", and "layers" will not be tracked for now.

Closes https://github.com/getsentry/team-replay/issues/539

@aliu39 aliu39 requested review from billyvg and cmanallen February 6, 2025 05:31
@@ -0,0 +1,15 @@
export type FeatureGate = {
readonly name: string;
readonly value: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

Excluded props:
// readonly ruleID: string;
// readonly details: EvaluationDetails;
// readonly __evaluation: GateEvaluation | null;

Comment on lines +6 to +7
type EventNameToEventDataMap = {
gate_evaluation: { gate: FeatureGate };
Copy link
Member Author

Choose a reason for hiding this comment

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

@aliu39 aliu39 requested a review from billyvg February 6, 2025 21:55
@aliu39 aliu39 requested a review from a team February 6, 2025 23:21
Copy link

codecov bot commented Feb 6, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
635 2 633 302
View the top 2 failed test(s) by shortest run time
tracing/browserTracingIntegration/long-tasks-before-navigation/test.ts doesn't capture long task spans starting before a navigation in the navigation transaction
Stack Traces | 30s run time
test.ts:7:11 doesn't capture long task spans starting before a navigation in the navigation transaction
tracing/dsc-txn-name-update/test.ts updates the DSC when the txn name is updated and high-quality
Stack Traces | 30s run time
test.ts:12:11 updates the DSC when the txn name is updated and high-quality

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@billyvg billyvg removed the request for review from a team February 7, 2025 16:18
Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

Does our unleash SDK have users? best practice would be to add featureFlagClient arg to unleash integration and keep unleashClient as optional but deprecated - then in a breaking release we can remove. But actually if it's only published in v9 branch it's probably fine to break it now (not in this PR).

@aliu39
Copy link
Member Author

aliu39 commented Feb 7, 2025

Does our unleash SDK have users? best practice would be to add featureFlagClient arg to unleash integration and keep unleashClient as optional but deprecated - then in a breaking release we can remove. But actually if it's only published in v9 branch it's probably fine to break it now (not in this PR).

It's released in v8 as well, I'm not sure how many users

@aliu39 aliu39 merged commit 22f841e into develop Feb 8, 2025
113 checks passed
@aliu39 aliu39 deleted the aliu/statsig branch February 8, 2025 01:38
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.

2 participants