feat(statsig): integrate @statsig/statsig-node-core and update depend…#2932
feat(statsig): integrate @statsig/statsig-node-core and update depend…#2932
Conversation
…encies - Added @statsig/statsig-node-core as a dependency for improved server-side functionality. - Updated Statsig client initialization to utilize the new core library. - Refactored user handling to support custom user fields and ensure compatibility with the new SDK. - Updated package versions in bun.lock, package.json, and pnpm-lock.yaml for consistency. Made-with: Cursor
Greptile SummaryThis PR migrates the server-side Statsig integration from the legacy Confidence Score: 4/5Safe to merge after confirming disableExposureLogging is supported by the new SDK The migration is clean and well-structured. The only open question is whether the new SDK's getExperiment honours the disableExposureLogging option the same way the old dedicated method did; all other changes are straightforward API shape adaptations. src/lib/statsig/hero-statsig.server.ts — specifically the getExperiment call with disableExposureLogging Important Files Changed
Reviews (1): Last reviewed commit: "feat(statsig): integrate @statsig/statsi..." | Re-trigger Greptile |
| const experiment = client.getExperiment(statsigUser, STATSIG_EXPERIMENT_BEST_DESCRIPTION, { | ||
| disableExposureLogging: true | ||
| }); |
There was a problem hiding this comment.
Verify
disableExposureLogging option is honoured by new SDK
The old code used the explicitly named getExperimentWithExposureLoggingDisabledSync, which made the no-logging contract unambiguous. The new call relies on { disableExposureLogging: true } being a recognised option in @statsig/statsig-node-core. If the option is silently ignored, the server will log an exposure for every SSR request, double-counting assignments in the Statsig dashboard and skewing experiment data. Worth confirming against the Node Core changelog or type definitions before shipping to production traffic.
…encies
Made-with: Cursor
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)