-
Notifications
You must be signed in to change notification settings - Fork 73
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: statsig integration PoC #747
feat: statsig integration PoC #747
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
543ed7f
to
07c3061
Compare
a059223
to
3062120
Compare
3062120
to
58d5217
Compare
58d5217
to
d389f5d
Compare
test friendly cleanup remove top level await use promises instead of top level await fix add temp hack to silence build error awlways render, otherwise app breaks if no statsig client lint setup statsig depending on abacus comments abstract analytics identifying , use new statsigconfig name
d389f5d
to
9061b48
Compare
5b12acd
to
17f3673
Compare
17f3673
to
e6c91e7
Compare
src/lib/statsig.ts
Outdated
import { StatsigClient } from '@statsig/js-client'; | ||
|
||
const fetchIp = async () => { | ||
const resp = await fetch('https://api.ipify.org?format=json'); |
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.
can we move this into useEndpointsConfig
? I think it's more secure to do this, also unsure if deployers want to use something diff here
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.
hmm we can... 🤔 but api.ipify.org is a public url so i don't think there's a security concern about exposing this
can update it if you feel strong tho, nw
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.
actually i like this idea a lot - deployers can stand up their own proxy servers this way which i think is totally worth doing if they feel like it - although not sure if we can use hooks in this lib since we're using it in a hook. investigatin 👀
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.
chatted offline; deploying without ip. sounds like we're synced about using the config for the url when we do log ip tho 🫡
src/lib/statsig.ts
Outdated
return statsigClient; | ||
}; | ||
|
||
export const statsigClientPromise = initStatsig(); |
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.
unsure if we need this const; can we just export initStatsig()
instead?
54d2a9c
to
8727658
Compare
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.
🚗
e57dcd7
to
213b5c2
Compare
213b5c2
to
4ec9b0f
Compare
ffa2f97
into
mulan/ote-462-abacus-set-up-statsig
Blocked by dydxprotocol/v4-abacus#489. Will fail CI checks until that PR is merged in and abacus version is bumped
Merges into #739
Builds on @moo-onthelawn's PR by adding a concept of a non-hook based statsig gate request.
It's necessary to do this because we have some abacus initialization we do that requires us to fetch statsig configs within a useEffect hook in order for us to make sure we start up abacus only once (with the correct statsig configs).
Some specifics this PR does: