Repository navigation
feat: Statsig provider with event allowlist and isolated staging opt-in (PLAT-1203) - #57
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
Original prompt from Italo.matos
|
|
Test status (local): Attention points:
|
|
@claude faça o code review deste PR. |
…ão isolada de staging Co-authored-by: Italo Matos <italo.matos@useblu.com.br> Co-Authored-By: italo.matos@useblu.com.br <italomatos@gmail.com>
Co-authored-by: Italo Matos <italo.matos@useblu.com.br> Co-Authored-By: italo.matos@useblu.com.br <italomatos@gmail.com>
7a403b4 to
e6bc8a0
Compare
|
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Adds a
Statsigprovider so events already flowing through blu-lytics can also feed Statsig (rollout/observability layer). Bluff remains the feature-flag source; this PR only adds an event sink.src/providers/setups/statsig/statsig.ts: new provider built on@statsig/js-client(3.33.5).statsigOptions.eventsare forwarded; anything else is dropped. No client key → provider never initializes.userID=client_uuidfrom the default properties (business unit for the funnel);customIDs.userID= the id passed tosendUserIdentification(numericuser.id). No PII is sent.environment.tierfollows the blu-lytics environment (staging/production).setTimeoutdelay (unlike Mixpanel) and every SDK call is wrapped in try/catch.src/initializers: acceptsstatsigOptions: { events: string[]; sendInStaging?: boolean }and wires the provider.src/dispatchers: in non-production the dispatcher still onlyconsole.logs for all existing providers; whensendInStaging === trueonly the Statsig provider additionally receives the event. Mixpanel/Clarity/FullStory/Sentry behaviour is unchanged.package.json:semantic-releasemoved to its sorted position; version stays managed by semantic-release.Jira: https://useblu.atlassian.net/browse/PLAT-1203
Feature doc: https://github.com/Pagnet/product-bluprints/tree/main/prd-tracking/PLAT-1203-rollout-observabilidade-statsig
Type of change
Checklist
yarn test)yarn lint). Fix it withyarn lint:fixin case of failure.tsc --noEmit; the repo has nolint:typesscript)Link to Devin session: https://app.devin.ai/sessions/f002eb1668b74839a451504f515e85de
Open in Devin Desktop: https://app.devin.ai/desktop/session/f002eb1668b74839a451504f515e85de?variant=devin