Log PostHog payload.

This commit is contained in:
Sam Rose 2024-08-12 15:34:23 +01:00
parent 72a37ed1a7
commit b01c111567
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,8 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
tags[`readFromPostHog`] = true tags[`readFromPostHog`] = true
const posthogFlags = await posthog.getAllFlagsAndPayloads(identity._id) const posthogFlags = await posthog.getAllFlagsAndPayloads(identity._id)
console.log("posthog flags", JSON.stringify(posthogFlags))
for (const [name, value] of Object.entries(posthogFlags.featureFlags)) { for (const [name, value] of Object.entries(posthogFlags.featureFlags)) {
if (!this.isFlagName(name)) { if (!this.isFlagName(name)) {
// We don't want an unexpected PostHog flag to break the app, so we // We don't want an unexpected PostHog flag to break the app, so we