-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Allow users to enable session replay during product analytics onboarding #22339
Conversation
Size Change: -40 B (0%) Total Size: 1.05 MB ℹ️ View Unchanged
|
Not sure why the experiments test keeps failing @neilkakkar @jurajmajerik , am I missing something? |
] | ||
|
||
if (featureFlags[FEATURE_FLAGS.ENABLE_SESSION_REPLAY_PA_ONBOARDING]) { | ||
options.push({ |
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.
Should we also enable console logs, network performance?
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.
yep iirc the default in replay is console logs and "performance" opt in, not headers or body capture
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.
Ok, added.
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.
didn't run it but looks good to me
…nboarding (#22339) * flag toggle to enable session replay during pa onboarding * turn on console log, network perf by default
…nboarding (#22339) * flag toggle to enable session replay during pa onboarding * turn on console log, network perf by default
...configOptions | ||
.filter((option) => option.visible) | ||
.map((option) => ({ | ||
title: option.title, | ||
description: option.description, | ||
type: option.type as ConfigType, | ||
selectOptions: option.selectOptions, | ||
value: option.value, | ||
onChange: (newValue: boolean | string | number) => { | ||
// Use the current value from the ref to ensure that onChange always accesses | ||
// the latest state of configOptions, preventing the closure from using stale data. | ||
const updatedConfigOptions = configOptionsRef.current.map((o) => | ||
o.teamProperty === option.teamProperty ? { ...o, value: newValue } : o | ||
) | ||
setConfigOptions(updatedConfigOptions) | ||
}, | ||
})), |
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.
@zlwaterfield when we move to a single subscribe, we should make sure people are aware of the potential costs here when enabling replay from analytics onboarding.
Problem
The toggle is gated behind a 50% flag. https://us.posthog.com/project/2/experiments/33719
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?